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

shfmt

Free#12 of 34 in Code Formatting Tools

shfmt: A configurable open-source formatter for shell scripting teams and automated workflows. Ranked #12 of 34 in Code Formatting Tools by our editors (6.1/10); pricing: Open source; best for shell scripting teams.

6.1/10Editor score
shfmt6.1 Visit shfmt

At a glance

  • Editor score
    6.1 / 10
  • Pricing
    Open source
  • Best for
    Shell scripting teams
  • Paid from
    None
  • Supported languages
    POSIX Shell, Bash, Zsh, mksh, and Bats
  • Facts checked
    21 Sep 2026
shfmt screenshot
  • Where it wins

    • Supports POSIX Shell, Bash, Zsh, mksh, and Bats
    • Formats files, directories, standard input, and recursive shell files
    • Works with EditorConfig, ignore rules, editors, CI, and pre-commit
  • Where it doesn't

    • Focused on shell dialects rather than broader programming languages
    • Command-line workflows may not suit teams seeking a visual formatter
    • Configuration covers shell layout options but requires project decisions

Our verdict on shfmt

shfmt is an open-source command-line formatter for developers maintaining shell programs locally or in automated workflows. It supports POSIX Shell, Bash, Zsh, mksh, and Bats, and runs on Linux, Windows, and macOS. Teams can format files, directories, or standard input, while recursive discovery helps apply formatting across shell files. Its scope makes it a strong fit for shell scripting teams that want a focused formatter with configurable output rather than a general-purpose code-formatting platform.

Formatting control is a central strength. shfmt supports configurable indentation, case indentation, binary-operator placement, and redirect spacing, with options read from EditorConfig. It can list changed files, write formatted files, or print diffs, giving teams several ways to review or enforce changes. Ignore rules for selected paths, plus simplification, minification, and shell syntax validation, extend the tool beyond basic layout changes. Typed JSON syntax-tree input and output also support workflows that need structured parser and formatter data.

Its ecosystem fit is broad for a command-line tool: integrations include BashSupport-Pro, the IntelliJ shell script plugin, micro, NeoVim, VS Code, Emacs, Trunk, Docker, and pre-commit. The project also exposes parser and formatter functionality through Go packages, which can support programmatic workflows. shfmt is a clear choice for teams standardizing shell code across editors and automation. Teams working primarily outside shell scripting, or looking for a broader multi-language formatting system, should choose a tool with wider language coverage.

shfmt pricing

Plans Open sourceFree Free to use — no paid tier required for the core job.
See plans on github.com

shfmt fact sheet

Free planNot verified
Paid fromNone
Supported languagesPOSIX Shell, Bash, Zsh, mksh, and Bats
Supported platformsLinux, Windows, macOS
Editor integrationYes
Ignore filesYes
Changed-lines formattingNot verified
Library APIYes
License modelOpen_source
DeploymentDesktop
PlatformsLinux, Windows, macOS
SupportCommunity, Docs
Built forSolo, Small business, Mid-market, Enterprise (editorial estimate)
Integrations9 integrations: BashSupport-Pro, IntelliJ shell script plugin, micro, NeoVim, VS Code, Emacs …
PricingOpen source
Websitegithub.com
Facts checked21 Sep 2026

shfmt integrations

shfmt lists 9 integrations on its own site.

  • BashSupport-Pro
  • IntelliJ shell script plugin
  • micro
  • NeoVim
  • VS Code
  • Emacs
  • Trunk
  • Docker
  • pre-commit

Alternatives to shfmt

See all shfmt alternatives →

Used shfmt? 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 shfmt 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 — shfmt 6.1/10

shfmt 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/shfmt/"><img src="https://www.itechguides.com/best/badge/shfmt.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