Poor SQL is a free tool for reformatting and colorizing T-SQL code according to chosen settings.
Alternatives to PgSanity
SQLFormat.org is a free online tool for formatting SQL statements, available through a web page and an API.
sqlfmt is a PostgreSQL SQL formatter available as a command-line tool and as a browser formatter that runs through WebAssembly without installation.
- 4
RegSQL
RegSQL is a web-based SQL workspace with browser-local formatting and optional AI tools for generating, explaining, or repairing queries.
Free planWeb6.5From $8 a month - 5
SQLCheck
SQLCheck is a free command-line utility for identifying common SQL anti-patterns that can slow queries.
Free planLinuxmacOSWindows6.5Free plan - 6
sqlfmt
sqlfmt is an online SQL formatter and validator for working with queries in PostgreSQL, MySQL, SQLite, SQL Server (T-SQL), and BigQuery.
Free planWebAPI6.5From $9 a month - 7

SQLFluff
SQLFluff is an open source SQL linter designed with ELT applications in mind.
Free planAPILinuxmacOSSelf-hosted6.4Free plan - 8
Squawk
Squawk is an open-source linter and language server for PostgreSQL migrations and SQL.
AndroidiOSWebAPI6.4 - 9

SQL Formatter
SQL Formatter is a free, open-source JavaScript library for formatting SQL queries.
Free planWebExtensionLinuxmacOS6.3Free plan - 106.3Free plan
- 11
pgFormatter
pgFormatter is a free formatter for PostgreSQL queries and PL/pgSQL code, with support for SQL-92, SQL-99, SQL-2003, SQL-2008, SQL-2011, PostgreSQL…
Free planWebAPILinuxSelf-hosted6.2Free plan - 12
Sleek
Sleek is a free command-line tool for formatting SQL files to keep their style consistent and readable.
Free planExtensionLinuxmacOSWindows6.2Free plan - 13
SQL Pretty Printer
SQL Pretty Printer reformats SQL for easier reading and can create syntax-colored document output.
WebWindows6.2$50, paid once - 14
JSQLFormatter
JSQLFormatter is a platform-independent SQL formatter, beautifier, and pretty printer.
Free planLinuxmacOSSelf-hostedWindows6.1Free plan - 15
TSQLLint
TSQLLint identifies and reports undesirable patterns in T-SQL scripts.
Free planExtensionLinuxmacOSWindows6.1Free plan - 16
SQL Linter by SqlInt
SQL Linter by SqlInt is a free browser-based utility that reviews pasted SQL for anti-patterns, ambiguous references, and style problems.
Free planWeb5.9Free plan - 17
sql-tools
sql-tools is a free, browser-based toolkit for engineers working with Snowflake, BigQuery, Databricks, PostgreSQL, MySQL, and SQL Server.
Free planWeb5.9Free plan - 18
Primova SQL Formatter & Linter
Primova SQL Formatter & Linter is a free web tool for formatting SQL and checking queries for risky patterns.
Free planWeb5.8Free plan - 19
Public Tools SQL Formatter
Public Tools SQL Formatter is a free web tool that adjusts whitespace and keyword casing in SQL queries.
Free planWeb5.8Free plan - 20

SQL Enlight
SQL Enlight is a paid static code analysis and refactoring tool for SQL Server and T-SQL.
APIExtensionSelf-hostedWindows5.8 - 21
SQLint
SQLint is a free SQL parser and linter for Standard SQL (BigQuery), aimed at developers who want to check query style and format statements.
Free planLinux5.8Free plan - 22
SQL Formatter VSCode
SQL Formatter VSCode is the official VSCode extension for the SQL Formatter library, designed to format SQL files in the editor.
Free planExtension5.7Free plan - 23
Prettier SQL
Prettier SQL is a free, self-hosted plugin that adds SQL formatting to Prettier.
Free planSelf-hosted5.5Free plan - 24
Valk Guard
Valk Guard is a free SQL linter for scanning raw SQL and application code before changes merge.
LinuxmacOSWindows5.5 - 255.2