Skip to content
SPECIFICTION
Get listed

Sleek vs sqlfmt

Sleek

github.com

sqlfmt

github.com

Side by side

FigureSleeksqlfmt
Price fromFreeFree
Free planYesYes
Free trial——
Open source——
Web—Yes
WindowsYes—
macOSYes—
LinuxYesYes
API—Yes
Self-hosted—Yes
Plans published11
Spec score · SQL Linters and Formatters8.0 (#9)8.5 (#3)
LicenseThe project is available under the MIT License.sqlfmt is distributed under the PostgreSQL Licence.
PurposeSleek is a command-line tool for formatting SQL to maintain consistent style and readability.sqlfmt is a gofmt-style command-line formatter for PostgreSQL SQL.

Plans

Sleek

  • SleekFree

Sleek pricing →

sqlfmt

  • Browser formatterFree

sqlfmt pricing →

In their own words

Sleek

Sleek is a command-line SQL formatter for applying consistent styles across SQL files. Its configurable options include indentation, keyword casing, and blank lines between queries. You can pass file paths or glob patterns, or provide input through standard input when no paths are supplied. The `--check` flag reports whether files are formatted without changing them. Sleek supports PostgreSQL, MySQL, MariaDB, SQLite, SQL Server, and Oracle. Its VS Code extension can format documents or selections, check formatting, and optionally format on save or paste; it can also download the CLI when it is not found. The CLI is available as compiled binaries or through Cargo, which requires Rust, and the project directs users to choose a binary for their operating system and architecture. Sleek is available under the MIT License, with formatting handled by the `sqlformat` crate. Building release v0.4.0 requires Rust 1.85 or later. The listed plan is free, with a free plan and no free trial.

Visit github.com

sqlfmt

sqlfmt is a free formatter for PostgreSQL SQL, available as a command-line tool and as a browser formatter running through WebAssembly. Its river-aligned style pads clause keywords so they share a column. The CLI reads SQL from files or stdin and writes formatted SQL to stdout; it can also rewrite files in place, list files needing changes, and show unified diffs. Its explain subcommand formats PostgreSQL plan text and can provide advice, canonicalized output, or structural comparisons. Plan advice describes join order, join and access methods, and parallelism, without costs, row estimates, or timing. The explain diff operation returns exit code 0 for structurally identical plans and 1 when structures differ, so it can be used in scripts and CI. A Go subpackage provides formatting for Go programs, and the project includes Emacs and Vim integrations. The browser build exposes formatting and version functions to JavaScript. Deeply nested subqueries and less common upsert or DDL forms remain best-effort areas. sqlfmt is intended for standalone formatting and SQL used in The Art of PostgreSQL book and courses.

Visit github.com