SQLFormat.org is a free online tool for formatting SQL statements, available through a web page and an API.
Alternatives to Poor SQL
Poor SQL gives T-SQL users a free way to reformat and colorize code with detailed controls for indentation, width, clause breaks, comma lists, Boolean and CASE expressions, and JOIN ON sections. It runs in the browser without sending submitted SQL to an external service, and formatting remains available offline. Input SQL, formatted SQL, and HTML source views support different output needs. Obfuscation and minification add randomized colors, line lengths, keyword case, and…
sqlfmt is a PostgreSQL SQL formatter available as a command-line tool and as a browser formatter that runs through WebAssembly without installation.
RegSQL is a web-based SQL workspace with browser-local formatting and optional AI tools for generating, explaining, or repairing queries.
- 4
SQLCheck
SQLCheck is a free command-line utility for identifying common SQL anti-patterns that can slow queries.
Free planLinuxmacOSWindows6.5Free plan - 5
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 - 6

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

SQL Formatter
SQL Formatter is a free, open-source JavaScript library for formatting SQL queries.
Free planWebExtensionLinuxmacOS6.3Free plan - 96.3Free plan
- 10
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 - 11
Sleek
Sleek is a free command-line tool for formatting SQL files to keep their style consistent and readable.
Free planExtensionLinuxmacOSWindows6.2Free plan - 12
SQL Pretty Printer
SQL Pretty Printer reformats SQL for easier reading and can create syntax-colored document output.
WebWindows6.2$50, paid once - 13
JSQLFormatter
JSQLFormatter is a platform-independent SQL formatter, beautifier, and pretty printer.
Free planLinuxmacOSSelf-hostedWindows6.1Free plan - 14
TSQLLint
TSQLLint identifies and reports undesirable patterns in T-SQL scripts.
Free planExtensionLinuxmacOSWindows6.1Free plan - 15
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 - 16
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 - 17
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 - 18
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 - 19

SQL Enlight
SQL Enlight is a paid static code analysis and refactoring tool for SQL Server and T-SQL.
APIExtensionSelf-hostedWindows5.8 - 20
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 - 21
PgSanity
PgSanity checks PostgreSQL SQL files for syntax errors using ecpg, which relies on PostgreSQL’s parser.
Free planLinuxSelf-hosted5.7Free 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