Suggestions appear as you type. Use the up and down arrows to choose one and Enter to open it.

This page's audience real numbers from our own analytics — open to see them
–Visitors
–Page views
–Clicks to vendors
–Time on page
–Reading now
Clicks to vendors, by tool
  • –
Top countries
  • –
Devices
  • –

– · counted by iTechGuides's own first-party analytics, bots removed, every figure rounded down · how we count

goimports

Free#15 of 34 in Code Formatting Tools

goimports: A focused Go formatter that cleans imports and supports editor save workflows. Ranked #15 of 34 in Code Formatting Tools by our editors (5.9/10); pricing: Open source; best for go teams needing import cleanup.

5.9/10Editor score
goimports5.9 Visit goimports

At a glance

  • Editor score
    5.9 / 10
  • Pricing
    Open source
  • Best for
    Go teams needing import cleanup
  • Paid from
    None
  • Supported languages
    Go
  • Facts checked
    21 Sep 2026
  • Where it wins

    • Adds missing and removes unreferenced Go imports
    • Formats code in gofmt style with optional diff output
    • Supports editor save hooks and .goimportsignore exclusions
  • Where it doesn't

    • Supports Go rather than multiple programming languages
    • Command-line distribution is narrower than hosted tools
    • No AI features

Our verdict on goimports

goimports is an open-source command-line tool for Go developers who want formatting and import management in one workflow. It formats Go source in gofmt style, adds missing imports, and removes unreferenced imports. The tool can process files, directories, or standard input, and it can write formatted output back to source files. Its focus is narrow: teams working primarily in Go will get the clearest fit, while developers seeking a multi-language formatter should consider a broader tool.

Its strongest advantage is the depth of its formatting and import workflow. goimports can rewrite files in place, display diffs instead of changing files, list files whose formatting differs, or run in format-only mode. A .goimportsignore file can exclude directories from import scanning, which gives teams control over where import cleanup applies. The underlying imports functionality is also available through a Go package API, extending its use beyond the command-line interface. These options suit repositories that need formatting checks, review-friendly diffs, or automated save-time cleanup.

Editor integration adds practical ecosystem fit without changing the tool's Go-centered scope. Published integrations include Emacs, Vim, and GoSublime, while save hooks support formatting as part of an editor workflow. goimports is distributed as a Go command through the golang.org/x/tools module and is open source, rather than presented as a hosted service with commercial tiers. Choose it for Go projects that want automatic import cleanup alongside gofmt-style formatting. Choose an alternative if your team needs broad language coverage, a hosted platform, or AI-assisted formatting.

goimports pricing

Plans Open sourceFree Free to use — no paid tier required for the core job.
See plans on pkg.go.dev

goimports fact sheet

Free planNot verified
Paid fromNone
Supported languagesGo
Supported platformsweb, windows, macos, linux
Editor integrationYes
Ignore filesYes
Changed-lines formattingNot verified
Library APIYes
License modelOpen_source
DeploymentCloud, Desktop
PlatformsWeb, Windows, macOS, Linux
SupportDocs
Built forSolo, Small business, Mid-market, Enterprise (editorial estimate)
Integrations3 integrations: Emacs, Vim, GoSublime
PricingOpen source
Websitepkg.go.dev
Facts checked21 Sep 2026

goimports integrations

goimports lists 3 integrations on its own site.

  • Emacs
  • Vim
  • GoSublime

Alternatives to goimports

See all goimports alternatives →

Used goimports? Be the first to review it

The editor score above is our own research. What this page doesn't have yet is a reader's view — what you used goimports for, what worked and what didn't. No stars are seeded and no review is paid for; an editor reads every one before it appears.

Write a reviewTwo minutes · verified accounts only · read by an editor before it appears

Reviews come only from verified accounts. Sign in or create an account first — your e-mail is never shown.

Your rating

0 characters · at least 80, up to 3,000

Posted from your verified account. Reviews appear after an editor reads them, usually within two working days.

Featured on iTechGuides

Featured on iTechGuides — goimports 5.9/10

goimports is listed in our Code Formatting Tools directory. Add the badge to your site — it links back to this page.

<a href="https://www.itechguides.com/products/goimports/"><img src="https://www.itechguides.com/best/badge/goimports.svg" alt="Featured on iTechGuides" width="230" height="46"></a>

Reviewed by iTechGuides Editors · Editorial team · Updated Sep 2026

Advertiser disclosure: iTechGuides is reader-supported. We may earn a commission when you click some links. It never changes a score or a verdict. How we rank.

Last updated · How we research and update