Skip to content
SPECIFICTION
Get listed

PgSanity vs SQL Formatter

PgSanity

github.com

SQL Formatter

sql-formatter-org.github.io

Side by side

FigurePgSanitySQL Formatter
Price fromFreeFree
Free planYesYes
Free trial——
Open source——
Web—Yes
Windows—Yes
macOS—Yes
LinuxYesYes
Self-hostedYes—
Plans published11
Spec score · SQL Linters and Formatters7.9 (#11)7.7 (#13)
LicensePyPI lists the project’s license expression as MIT.The software is released under the MIT license.
PurposePgSanity checks the syntax of PostgreSQL SQL files.SQL Formatter is a JavaScript library for pretty-printing SQL queries.

Plans

PgSanity

  • FreeFree

PgSanity pricing →

SQL Formatter

  • FreeFree

SQL Formatter pricing →

In their own words

PgSanity

PgSanity has no write-up on Specifiction yet; its figures are above.

Visit github.com

SQL Formatter

SQL Formatter is a free, MIT-licensed JavaScript library for pretty-printing SQL queries, with a browser demo and command-line tool. Formatting options include indentation; keyword, data type, function, and identifier case; logical operator placement; expression width; query spacing; and operator spacing. It supports dialects including BigQuery, ClickHouse, DB2, DuckDB, Hive, MariaDB, MySQL, TiDB, Couchbase N1QL, Oracle PL/SQL, PostgreSQL, Redshift, SingleStoreDB, Snowflake, Spark, SQL Server Transact-SQL, and Trino/Presto. The command-line tool accepts SQL from standard input or a file, can produce formatted output, and can update a file in place. The project also lists VS Code and Vim extensions, a Prettier plugin, and an ESLint integration. Its JSON Schema supports configuration-file autocompletion and IntelliSense, with usage guides for VS Code and Zed. The library can replace prepared-statement placeholders when parameter values are supplied. It does not support stored procedures or changing the delimiter from a semicolon. Templating syntax is not directly supported; a parameter-type workaround may not cover every construct. The maintainer describes the project as being in maintenance mode, with feasible bug fixes and likely no new features.

Visit sql-formatter-org.github.io