Best SQL Linters and Formatters in 2026
Updated
In short: sqlfmt is ranked #1 of 26 as of 5 October 2026, ahead of pgFormatter and Poor SQL. The best-ranked option with a free plan is pgFormatter.
Keeping SQL readable and consistent can mean choosing a formatter, a linter, or tooling that covers both. Compared on supported SQL dialects, automatic fixes, custom rules, and configuration files, these entries also show editor extensions and CI/CD integration. Free plans and paid-from pricing give cost details to consider alongside workflow fit. sqlfmt, pgFormatter, and Poor SQL are among the options, with Squawk and Sleek also listed. Check whether the dialects and editors match your stack, then weigh how much rule customization and automation your team needs for local development or continuous integration.
26 SQL linters and formatters ranked on what their makers publish — plans and prices, free tiers, platforms and the facts on their own pages.
SQL Linters and Formatters, one module each. A lit port is something its maker publishes; 6 of the 25 on this page have a public API.
- 01 sqlfmt API yesOSS not on recordFREE yesDOCS 7.4Free
- 02 pgFormatter API yesOSS not on recordFREE yesDOCS 7.3Free
- 03 Poor SQL API yesOSS not on recordFREE yesDOCS 7.3Free
- 04 SQLFluff API yesOSS not on recordFREE yesDOCS 7.2Free
- 05 SQLFormat.org API yesOSS not on recordFREE yesDOCS 7.2Free
- 06 Squawk API yesOSS not on recordFREE not on recordDOCS 7.0
- 07 Sleek API not on recordOSS not on recordFREE yesDOCS 5.9Free
- 08 SQLint API not on recordOSS not on recordFREE yesDOCS 5.9Free
- 09 Sqruff API not on recordOSS not on recordFREE yesDOCS 5.9Free
- 10 TSQLLint API not on recordOSS not on recordFREE yesDOCS 5.9Free
- 11 JSQLFormatter API not on recordOSS not on recordFREE yesDOCS 5.8Free
- 12 PgSanity API not on recordOSS not on recordFREE yesDOCS 5.8Free
- 13 SQL Formatter API not on recordOSS not on recordFREE yesDOCS 5.8Free
- 14 SQL Formatter VSCode API not on recordOSS not on recordFREE yesDOCS 5.8Free
- 15 sql-tools API not on recordOSS not on recordFREE yesDOCS 5.8Free
- 16 prettier-plugin-sql-cst API not on recordOSS not on recordFREE not on recordDOCS 5.1
- 17 SQL Enlight API not on recordOSS not on recordFREE not on recordDOCS 5.1
- 18 SQL Pretty Printer API not on recordOSS not on recordFREE not on recordDOCS 5.1
- 19 SQLCheck API not on recordOSS not on recordFREE not on recordDOCS 5.1
- 20 sqlfmt API not on recordOSS not on recordFREE not on recordDOCS 5.1
- 21 Valk Guard API not on recordOSS not on recordFREE not on recordDOCS 5.1
- 22 Prettier SQL API not on recordOSS not on recordFREE not on recordDOCS 5.0
- 23 Primova SQL Formatter & Linter API not on recordOSS not on recordFREE not on recordDOCS 5.0
- 24 Public Tools SQL Formatter API not on recordOSS not on recordFREE not on recordDOCS 5.0
- 25 RegSQL API not on recordOSS not on recordFREE not on recordDOCS 5.0
Compare all 25 in a table
| # | Platform | Score | Free plan | From | Free plan | Paid from | Supported SQL dialects | Automatic fixes |
|---|---|---|---|---|---|---|---|---|
| 1 | sqlfmt | 7.4 | Free plan | Free | Yes | — | PostgreSQL | Yes |
| 2 | pgFormatter | 7.3 | Free plan | Free | Yes | — | SQL-92, SQL-99, SQL-2003, SQL-2008, SQL-2011, PostgreSQL; works with other databases | Yes |
| 3 | Poor SQL | 7.3 | Free plan | Free | Yes | — | T-SQL | Yes |
| 4 | SQLFluff | 7.2 | Free plan | Free | Yes | — | — | — |
| 5 | SQLFormat.org | 7.2 | Free plan | Free | Yes | — | No specific dialects; non-validating and dialect-agnostic | — |
| 6 | Squawk | 7.0 | No | — | — | — | PostgreSQL | No |
| 7 | Sleek | 5.9 | Free plan | Free | Yes | — | PostgreSQL, MySQL, MariaDB, SQLite, SQL Server, Oracle | Yes |
| 8 | SQLint | 5.9 | Free plan | Free | Yes | — | Standard SQL (BigQuery) | Yes |
| 9 | Sqruff | 5.9 | Free plan | Free | Yes | — | ansi, athena, bigquery, clickhouse, databricks, db2, duckdb, exasol, greenplum, hive, mariadb, materialize, mysql, oracle, postgres, redshift, snowflake, sparksql, sqlite, starrocks, teradata, trino, tsql, vertica | Yes |
| 10 | TSQLLint | 5.9 | Free plan | Free | Yes | — | T-SQL (Transact-SQL) | Yes |
| 11 | JSQLFormatter | 5.8 | Free plan | Free | — | — | Oracle, SQL Server, MySQL, MariaDB, PostgreSQL, H2, DuckDB, BigQuery, Redshift, Databricks, Snowflake | — |
| 12 | PgSanity | 5.8 | Free plan | Free | Yes | — | PostgreSQL | — |
| 13 | SQL Formatter | 5.8 | Free plan | Free | — | — | Standard SQL, BigQuery, ClickHouse, IBM DB2, IBM DB2i, DuckDB, Apache Hive, MariaDB, MySQL, TiDB, Couchbase N1QL, Oracle PL/SQL, PostgreSQL, Amazon Redshift, SingleStoreDB, Snowflake, Spark, SQLite, SQL Server Transact-SQL, Trino/Presto | Yes |
| 14 | SQL Formatter VSCode | 5.8 | Free plan | Free | — | — | BigQuery, DB2 for LUW, DB2 for IBM i, DuckDB, Hive, MariaDB, MySQL, N1QL, PL/SQL, PostgreSQL, Amazon Redshift, SingleStoreDB, Snowflake, Spark, SQLite, Trino (Presto), Transact-SQL | Yes |
| 15 | sql-tools | 5.8 | Free plan | Free | Yes | — | Snowflake, BigQuery, Databricks, PostgreSQL, MySQL, SQL Server | — |
| 16 | prettier-plugin-sql-cst | 5.1 | No | — | Yes | — | SQLite, BigQuery, PostgreSQL, PL/pgSQL, MySQL, MariaDB | Yes |
| 17 | SQL Enlight | 5.1 | No | — | — | — | T-SQL | Yes |
| 18 | SQL Pretty Printer | 5.1 | No | — | Yes | — | 30+; SQL Server, Oracle, MySQL, PostgreSQL, Snowflake, BigQuery | Yes |
| 19 | SQLCheck | 5.1 | No | — | Yes | — | Microsoft SQL Server, MySQL, Oracle, PostgreSQL, SQLite3 | No |
| 20 | sqlfmt | 5.1 | No | — | Yes | — | PostgreSQL, MySQL, SQLite, SQL Server (T-SQL), BigQuery | Yes |
| 21 | Valk Guard | 5.1 | No | — | Yes | — | PostgreSQL | No |
| 22 | Prettier SQL | 5.0 | No | — | Yes | — | sql, bigquery, db2, db2i, hive, mariadb, mysql, n1ql, postgresql, plsql, redshift, singlestoredb, snowflake, spark, sqlite, transactsql, tsql, trino, clickhouse; node-sql-parser databases: bigquery, db2, hive, mariadb, mysql, postgresql, transactsql, flinksql, snowflake | Yes |
| 23 | Primova SQL Formatter & Linter | 5.0 | No | — | Yes | — | Standard SQL, PostgreSQL, MySQL, SQLite, MariaDB, T-SQL (SQL Server), BigQuery, Snowflake | — |
| 24 | Public Tools SQL Formatter | 5.0 | No | — | Yes | — | Standard SQL, PostgreSQL, MySQL, MariaDB, SQLite, SQL Server, Oracle PL/SQL, BigQuery, Snowflake, Redshift, Spark, Hive, Trino, DuckDB, ClickHouse, Db2, N1QL, SingleStore, TiDB | No |
| 25 | RegSQL | 5.0 | No | — | Yes | — | PostgreSQL, MySQL, MariaDB, SQLite, BigQuery, SQL Server, Snowflake, Oracle PL/SQL; the site also states 9 dialects but visibly names 8 | Yes |
Is your platform on this list?
Numbered spots on this list can be sponsored, and a sponsored row is labelled as paid.
Questions about this list
Which SQL linters and formatter is ranked first on Inferse?
sqlfmt is ranked #1 of 26 with a score of 7.4. pgFormatter is second and Poor SQL third.
How many of these have a free plan?
14 of the 25 on this page publish a free plan on their own pricing pages.
How is this list ranked?
Ranked on what each maker publishes, open and connectable first: a public API, open-source code, the depth of its documentation and a free tier to try it on. Model lists are sorted by the figure in their title, exactly as each provider publishes it.


