Tech riderRev. 1 Oct 2026
- 1Runs onLinux, Mac, Windows
- 2CostsFree plan
- 3℗License modelopen source
- 4Supported languagesGo
- 5Supported platformsWindows, macOS, Linux
- 6Editor integrationYes
- 7Ignore filesNo
- 8Changed-lines formattingNo
- 9Library APIYes
9 lines stated Written from the maker's own pages: go.dev

Overview
gofmt is ranked #6 of 34 in code formatting tools on Specifiction. It runs on Linux, macOS, Windows. There is a free plan.
gofmt plans and pricing
All plansCompared on code formatting tools
Facts
- Purpose
- Gofmt automatically formats Go programs using tabs for indentation and blanks for alignment.go.dev · 1 Oct 2026
- Input handling
- Without an explicit path, gofmt processes standard input; with a directory, it recursively processes .go files while ignoring files beginning with a period.go.dev · 1 Oct 2026
- Output
- By default, gofmt prints reformatted sources to standard output.go.dev · 1 Oct 2026
- Formatting options
- Its flags include displaying diffs, listing files with formatting differences, applying rewrite rules, simplifying code, and reporting all errors.go.dev · 1 Oct 2026
- Comment formatting
- Gofmt reformats Go documentation comments into canonical paragraphs, lists, headings, links, and code blocks.go.dev · 1 Oct 2026
- Source transformation
- The -r flag applies rewrite rules whose patterns and replacements are valid Go expressions.go.dev · 1 Oct 2026
- Editor integrations
- The Go project documents gofmt integrations for Vim, Emacs, Eclipse, Sublime Text, Git pre-commit hooks, and Mercurial.go.dev · 1 Oct 2026
- Performance
- Since Go 1.18, gofmt reads and formats input files concurrently with memory limited proportionally to GOMAXPROCS.go.dev · 1 Oct 2026
- Distribution
- The Go installation process installs an executable called gofmt, equivalent to go fmt.go.dev · 1 Oct 2026
- Platforms
- The Go compiler toolchain can target AIX, Android, DragonFly BSD, FreeBSD, Illumos, Linux, macOS/iOS, NetBSD, OpenBSD, Plan 9, Solaris, and Windows.go.dev · 1 Oct 2026
- License
- Go is an open source project distributed under a BSD-style license.go.dev · 1 Oct 2026
- Security
- The Go project issues security fixes to the two most recent major Go releases and provides a security policy for reporting vulnerabilities.go.dev · 1 Oct 2026
- Support
- Questions about using Go or announcements relevant to Go users should be sent to the golang-nuts mailing list.go.dev · 1 Oct 2026
Best gofmt alternatives
See all 12 All accessCh 01 Accessibility Test Framework for Android Free planAndroidLinux Free to start7.4 All accessCh 02 Prettier Free planAPIBrowser Free to start7.4 All accessCh 03 Black Free planLinuxMac Free to start7.3 All accessCh 04 rustfmt Free planLinuxMac Free to start7.3 All accessCh 05 Biome Free planBrowserLinux Free to start7.2 All accessCh 07 Ruff Free planLinuxMac Free to start7.2
Where it ranks on Specifiction
Is gofmt yours?
Claim it for free: prove the domain, then correct facts, plans and screenshots. An editor reviews every change.
Sources
- go.dev/cmd/gofmt/· checked 1 Oct 2026
- go.dev/doc/comment· checked 1 Oct 2026
- go.dev/blog/gofmt· checked 1 Oct 2026
- go.dev/doc/go1.18· checked 1 Oct 2026
- go.dev/doc/cmd· checked 1 Oct 2026
- go.dev/doc/install/source· checked 1 Oct 2026
- go.dev/project· checked 1 Oct 2026
- go.dev/doc/security/· checked 1 Oct 2026


