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

This page's audience our own tag's counts — open to see them
–Visits
–Page views
–Clicks to vendors
–Time on page
–Reading now
Clicks to vendors, by tool
  • –
Top countries
  • –
Devices
  • –

– · visits, page views and clicks counted by our own tag, which counts more than our checked analytics; every figure rounded down · how we count

sqlfmt

Free#9 of 25 in SQL Linters and Formatters

sqlfmt: A focused PostgreSQL formatter with diff workflows, editor integrations, and CI support. Ranked #9 of 25 in SQL Linters and Formatters by our editors (7.8/10); pricing: Free plan; best for postgreSQL teams using diff-based formatting.

7.8/10Editor score
sqlfmt7.8 Visit sqlfmt

At a glance

  • Editor score
    7.8 / 10
  • Pricing
    Free plan
  • Best for
    PostgreSQL teams using diff-based formatting
  • Free plan
    Yes
  • Paid from
    Free
  • Supported SQL dialects
    PostgreSQL
  • Automatic fixes
    Yes
  • Facts checked
    20 Sep 2026
sqlfmt screenshot
  • Where it wins

    • Formats PostgreSQL SQL and rewrites files in place
    • Produces unified diffs and lists files needing formatting
    • Works with Emacs, Vim, WebAssembly, and GitHub Actions
  • Where it doesn't

    • Supports PostgreSQL rather than multiple SQL dialects
    • Command-line workflow may not suit teams wanting a broader GUI tool
    • Formatting follows river-aligned rules rather than configurable styles

Our verdict on sqlfmt

sqlfmt is an open-source, gofmt-style command-line formatter for PostgreSQL SQL. It is aimed at developers and teams that want consistent formatting across local workflows, editors, scripts, and CI pipelines. The tool can print formatted SQL, rewrite files in place with the -w option, identify files whose formatting would change, and read from standard input while writing to standard output. It also formats EXPLAIN statements and parses EXPLAIN plan output, extending its focus beyond ordinary query text.

Its strongest fit is a diff-based review workflow. sqlfmt can produce unified diffs for formatted SQL, making proposed changes visible before files are rewritten. Teams can use GitHub Actions for CI testing, while Emacs and Vim integrations bring formatting into established editor workflows. A WebAssembly build supports browser use, and the included Go formatting library provides a programming interface for Go-based tooling. Together, these options cover command-line, editor, CI, browser, and library-based use without changing the product’s PostgreSQL focus.

The main trade-off is breadth. sqlfmt formats PostgreSQL SQL, so teams working across several SQL dialects should look for a formatter with wider dialect coverage. Its river-aligned formatting rules also present a defined style rather than a broad set of style choices. Choose sqlfmt when PostgreSQL consistency, in-place rewriting, unified diffs, and lightweight workflow integration matter most. Choose an alternative when a multi-dialect formatter or a more configurable presentation layer is the priority.

Your product? Our editors can test sqlfmt in depth and publish a review, labelled as paid · from $149/mo →

sqlfmt pricing

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

sqlfmt fact sheet

Free planYes
Paid fromFree
Supported SQL dialectsPostgreSQL
Automatic fixesYes
Custom rulesNot verified
Editor extensionsYes
CI/CD integrationYes
Configuration fileNot verified
DeploymentSelf-hosted, Browser extension
PlatformsWeb, Linux
SupportDocs, Community
Built forSolo, Small business, Mid-market, Enterprise (editorial estimate)
Integrations4 integrations: Emacs, Vim, GitHub Actions, WebAssembly
PricingFree plan
Websitegithub.com
Facts checked20 Sep 2026

sqlfmt integrations

sqlfmt lists 4 integrations on its own site.

  • Emacs
  • Vim
  • GitHub Actions
  • WebAssembly

Alternatives to sqlfmt

See all sqlfmt alternatives →

Used sqlfmt? 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 sqlfmt 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 — sqlfmt 7.8/10

sqlfmt is listed in our SQL Linters and Formatters directory. Add the badge to your site — it links back to this page.

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

Reviewed by iTechGuides Editors · Editorial team · Updated Oct 2026

Advertiser disclosure: iTechGuides is reader-supported. Vendors can pay for top positions in our rankings and for a place on other products' pages, and we may earn a commission when you click some links. Bought places stand at the number bought; this page and our disclosure say so. Paying vendors may get a fuller, more detailed review from our editors, and that review can change their score. How we rank.

Last updated · How we research and update