Skip to content
SPECIFICTION
Get listed

pgFormatter vs Sleek

pgFormatter

github.com

Sleek

github.com

Side by side

FigurepgFormatterSleek
Price fromFreeFree
Free planYesYes
Free trial——
Open source——
WebYes—
Windows—Yes
macOS—Yes
LinuxYesYes
APIYes—
Self-hostedYes—
Plans published11
Spec score · SQL Linters and Formatters8.2 (#6)8.0 (#9)
Formatting optionsOptions include changing keyword, function, identifier, and type case; adjusting indentation; wrapping queries; and choosing comma placement.It supports configurable indentation, keyword casing, and blank lines between queries.
InstallationThe README documents installation from a GitHub source tarball using Perl Makefile.PL, make, and make install.The CLI is available as compiled binaries from GitHub Releases or through Cargo, which requires Rust.
PurposepgFormatter beautifies PostgreSQL SQL queries and PL/pgSQL code, and supports keywords from several SQL standards as well as PostgreSQL-specific keywords.Sleek is a command-line tool for formatting SQL to maintain consistent style and readability.

Plans

pgFormatter

  • pgFormatterFree

pgFormatter pricing →

Sleek

  • SleekFree

Sleek pricing →

In their own words

pgFormatter

pgFormatter is free software for formatting PostgreSQL SQL queries and PL/pgSQL code. It supports SQL-92, SQL-99, SQL-2003, SQL-2008, SQL-2011 and PostgreSQL syntax, and the project says it also works with other databases. You can run it as a console program or CGI application that returns text or HTML; a CGI request with an application/json Accept header can return JSON. Formatting controls cover keyword, function, identifier and type case, indentation, query wrapping and comma placement. The --anonymize option hides query literals before formatting. The project documents source installation with Perl Makefile.PL, make and make install, Docker use, Vim and (Neo)Vim integration, Atom and Visual Studio Code links, and a pre-commit hook for SQL files. An online demo limits queries to ten thousand characters. It is distributed under the PostgreSQL Licence at free.

Visit github.com

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