Tech riderRev. 2 Oct 2026
- 1Runs onAPI, Linux, self-hosted, Web
- 2CostsFree plan
- 3Supported SQL dialectsPostgreSQL
- 4Automatic fixesYes
- 5Editor extensionsYes
- 6CI/CD integrationYes
6 lines stated Written from the maker's own pages: github.com

Overview
sqlfmt is ranked #2 of 26 in SQL linters and formatters on Specifiction. It runs on API, Linux, Self-hosted, Web. There is a free plan.
sqlfmt plans and pricing
All plansBrowser formatter Free runs in browser via WebAssembly · no install required github.com · 2 Oct 2026
Compared on SQL linters and formatters
- Free plan
- Yesgithub.com
- Supported SQL dialects
- PostgreSQLgithub.com
- Automatic fixes
- Yesgithub.com
- Editor extensions
- Yesgithub.com
- CI/CD integration
- Yesgithub.com
Facts
- Purpose
- sqlfmt is a gofmt-style command-line formatter for PostgreSQL SQL.github.com · 30 Sept 2026
- Formatting style
- It implements a river-aligned style that right-pads clause keywords to the same column.github.com · 30 Sept 2026
- Browser use
- The PostgreSQL SQL Formatter runs sqlfmt in a browser through WebAssembly and is free to use without installation.github.com · 30 Sept 2026
- CLI input/output
- The command reads SQL from files or stdin and writes formatted SQL to stdout, with options for in-place rewriting, listing differences, and unified diffs.github.com · 30 Sept 2026
- EXPLAIN tools
- The explain subcommand formats PostgreSQL plan text and can produce plan advice or structural diffs.github.com · 30 Sept 2026
- Plan comparison
- Explain diff exits 0 for structurally identical plans and 1 when their structures differ.github.com · 30 Sept 2026
- Canonicalization
- The -canonical option normalizes ordering and schema-qualification differences when comparing advice from different sources.github.com · 30 Sept 2026
- Go library
- The format subpackage exposes Format(io.Reader) (string, error) for formatting SQL in Go programs.github.com · 30 Sept 2026
- Editor integrations
- The repository provides an Emacs sqlfmt-mode and Vim ftplugin integration through formatprg and equalprg.github.com · 30 Sept 2026
- WebAssembly API
- The WebAssembly build exposes sqlfmt.format(sql) and sqlfmt.version to browser JavaScript.github.com · 30 Sept 2026
- WebAssembly size
- The TinyGo and wasm-opt build is about 330 KB, compared with about 2.9 MB for the standard Go WebAssembly target.github.com · 30 Sept 2026
- Compatibility limits
- Deeply nested subqueries and exotic upsert or DDL forms remain best-effort formatting areas.github.com · 30 Sept 2026
- Source corpus
- The formatting style was derived from 343 SQL files in The Art of PostgreSQL query corpus.github.com · 30 Sept 2026
- License
- sqlfmt is released under the PostgreSQL Licence.github.com · 30 Sept 2026
- Maker background
- Dimitri Fontaine describes himself as a PostgreSQL Major Contributor and the author of The Art of PostgreSQL.theartofpostgresql.com · 30 Sept 2026
- CLI modes
- The CLI formats files, rewrites files in place, lists files needing changes, shows unified diffs, reads stdin, and prints its version.github.com · 2 Oct 2026
- EXPLAIN support
- The explain subcommand formats EXPLAIN output and provides advice, diff, and canonical operations.github.com · 2 Oct 2026
- Plan advice
- The advice output describes join order, join method, access method, and parallelism without costs, row estimates, or timing.github.com · 2 Oct 2026
- CI use
- explain diff exits 0 when plans are structurally identical and 1 when they are not, so it composes into scripts and CI.github.com · 2 Oct 2026
- WASM size
- The TinyGo and Binaryen build is around 330KB compared with around 2.9MB for the standard Go WebAssembly target.github.com · 2 Oct 2026
- Build requirements
- Building WebAssembly requires tinygo and wasm-opt on PATH.github.com · 2 Oct 2026
- Known limits
- Deeply nested subqueries and exotic upsert or DDL forms remain best-effort.github.com · 2 Oct 2026
- Target use
- The tool is intended for SQL embedded in The Art of PostgreSQL book and courses and for standalone SQL formatting.github.com · 2 Oct 2026
- Maker profile
- Dimitri Fontaine identifies as a PostgreSQL Major Contributor and links to support at oss.theartofpostgresql.com.github.com · 2 Oct 2026
Best sqlfmt alternatives
See all 20 All accessCh 01 Squawk AndroidAPI 7.4 All accessCh 03 Poor SQL Free planAPILinux Free to start7.2 All accessCh 04 Sqruff Free planBrowserLinux Free to start7.2 All accessCh 05 TSQLLint Free planBrowserLinux Free to start7.2 All accessCh 06 JSQLFormatter Free planLinuxMac Free to start7.1 All accessCh 07 Sleek Free planBrowserLinux Free to start7.1
Where it ranks on Specifiction
Is sqlfmt yours?
Claim it for free: prove the domain, then correct facts, plans and screenshots. An editor reviews every change.
Sources
- github.com/dimitri/sqlfmt· checked 30 Sept 2026
- theartofpostgresql.com· checked 30 Sept 2026
- github.com/dimitri· checked 2 Oct 2026