Best SQL Linters and Formatters in 2026
Updated
In short: sqlfmt is ranked #1 of 26 as of 5 October 2026, ahead of Poor SQL and TSQLLint. The best-ranked option with a free plan is Poor SQL.
Consistent SQL style and checks for query issues are central reasons to consider a linter or formatter. Compare supported SQL dialects with automatic fixes and custom rules, then check configuration files, CI/CD integration and editor extensions for the workflow details that matter. Free-plan availability and paid-from pricing provide cost context. Sqruff and TSQLLint appear first, with pgFormatter and sqlfmt also among the early entries. Start with the SQL dialects and development environments you use, then decide how much rule configuration and automation would help your work.
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, ranked on how quickly a newcomer can get going. 14 of the 25 on this page can be tried for free.
- 1 sqlfmtFree plan
- Free to practise on: yes
- Free trial: not on record
- Well documented: yes
- Runs where you work: not on record
- 2 Poor SQLFree plan
- Free to practise on: yes
- Free trial: not on record
- Well documented: yes
- Runs where you work: yes
- 3 TSQLLintFree plan
- Free to practise on: yes
- Free trial: not on record
- Well documented: yes
- Runs where you work: yes
- 4 JSQLFormatterFree plan
- Free to practise on: yes
- Free trial: not on record
- Well documented: yes
- Runs where you work: yes
- 5 SqruffFree plan
- Free to practise on: yes
- Free trial: not on record
- Well documented: yes
- Runs where you work: yes
- 6 SleekFree plan
- Free to practise on: yes
- Free trial: not on record
- Well documented: yes
- Runs where you work: yes
- 7 SQL FormatterFree plan
- Free to practise on: yes
- Free trial: not on record
- Well documented: yes
- Runs where you work: yes
- 8 pgFormatterFree plan
- Free to practise on: yes
- Free trial: not on record
- Well documented: yes
- Runs where you work: not on record
- 9 sql-toolsFree plan
- Free to practise on: yes
- Free trial: not on record
- Well documented: yes
- Runs where you work: not on record
- 10 SQLFluffFree plan
- Free to practise on: yes
- Free trial: not on record
- Well documented: yes
- Runs where you work: yes
- 11 SQLFormat.orgFree plan
- Free to practise on: yes
- Free trial: not on record
- Well documented: yes
- Runs where you work: not on record
- 12 SQLintFree plan
- Free to practise on: yes
- Free trial: not on record
- Well documented: yes
- Runs where you work: not on record
- 13 Squawk
- Free to practise on: not on record
- Free trial: not on record
- Well documented: yes
- Runs where you work: yes
- 14 PgSanityFree plan
- Free to practise on: yes
- Free trial: not on record
- Well documented: yes
- Runs where you work: not on record
- 15 SQL Formatter VSCodeFree plan
- Free to practise on: yes
- Free trial: not on record
- Well documented: yes
- Runs where you work: not on record
- 16 Valk Guard
- Free to practise on: not on record
- Free trial: not on record
- Well documented: not on record
- Runs where you work: yes
- 17 SQL Pretty Printer
- Free to practise on: not on record
- Free trial: not on record
- Well documented: not on record
- Runs where you work: not on record
- 18 SQLCheck
- Free to practise on: not on record
- Free trial: not on record
- Well documented: not on record
- Runs where you work: yes
- 19 SQL Enlight
- Free to practise on: not on record
- Free trial: not on record
- Well documented: not on record
- Runs where you work: not on record
- 20 sqlfmt
- Free to practise on: not on record
- Free trial: not on record
- Well documented: not on record
- Runs where you work: not on record
- 21 prettier-plugin-sql-cst
- Free to practise on: not on record
- Free trial: not on record
- Well documented: not on record
- Runs where you work: not on record
- 22 SQL Linter by SqlInt
- Free to practise on: not on record
- Free trial: not on record
- Well documented: not on record
- Runs where you work: not on record
- 23 Prettier SQL
- Free to practise on: not on record
- Free trial: not on record
- Well documented: not on record
- Runs where you work: not on record
- 24 Primova SQL Formatter & Linter
- Free to practise on: not on record
- Free trial: not on record
- Well documented: not on record
- Runs where you work: not on record
- 25 Public Tools SQL Formatter
- Free to practise on: not on record
- Free trial: not on record
- Well documented: not on record
- Runs where you work: not on record
Compare all 25 in a table
| # | Platform | Score | Free plan | From | Free plan | Paid from | Supported SQL dialects | Automatic fixes |
|---|---|---|---|---|---|---|---|---|
| 1 | sqlfmt | 7.3 | Free plan | Free | Yes | — | PostgreSQL | Yes |
| 2 | Poor SQL | 7.2 | Free plan | Free | Yes | — | T-SQL | Yes |
| 3 | TSQLLint | 7.2 | Free plan | Free | Yes | — | T-SQL (Transact-SQL) | Yes |
| 4 | JSQLFormatter | 7.1 | Free plan | Free | — | — | Oracle, SQL Server, MySQL, MariaDB, PostgreSQL, H2, DuckDB, BigQuery, Redshift, Databricks, Snowflake | — |
| 5 | Sqruff | 7.0 | 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 |
| 6 | Sleek | 6.9 | Free plan | Free | Yes | — | PostgreSQL, MySQL, MariaDB, SQLite, SQL Server, Oracle | Yes |
| 7 | SQL Formatter | 6.9 | 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 |
| 8 | pgFormatter | 6.8 | Free plan | Free | Yes | — | SQL-92, SQL-99, SQL-2003, SQL-2008, SQL-2011, PostgreSQL; works with other databases | Yes |
| 9 | sql-tools | 6.8 | Free plan | Free | Yes | — | Snowflake, BigQuery, Databricks, PostgreSQL, MySQL, SQL Server | — |
| 10 | SQLFluff | 6.8 | Free plan | Free | Yes | — | — | — |
| 11 | SQLFormat.org | 6.8 | Free plan | Free | Yes | — | No specific dialects; non-validating and dialect-agnostic | — |
| 12 | SQLint | 6.7 | Free plan | Free | Yes | — | Standard SQL (BigQuery) | Yes |
| 13 | Squawk | 6.7 | No | — | — | — | PostgreSQL | No |
| 14 | PgSanity | 6.6 | Free plan | Free | Yes | — | PostgreSQL | — |
| 15 | SQL Formatter VSCode | 6.6 | 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 |
| 16 | Valk Guard | 6.0 | No | — | Yes | — | PostgreSQL | No |
| 17 | SQL Pretty Printer | 5.9 | No | — | Yes | — | 30+; SQL Server, Oracle, MySQL, PostgreSQL, Snowflake, BigQuery | Yes |
| 18 | SQLCheck | 5.9 | No | — | Yes | — | Microsoft SQL Server, MySQL, Oracle, PostgreSQL, SQLite3 | No |
| 19 | SQL Enlight | 5.8 | No | — | — | — | T-SQL | Yes |
| 20 | sqlfmt | 5.8 | No | — | Yes | — | PostgreSQL, MySQL, SQLite, SQL Server (T-SQL), BigQuery | Yes |
| 21 | prettier-plugin-sql-cst | 5.7 | No | — | Yes | — | SQLite, BigQuery, PostgreSQL, PL/pgSQL, MySQL, MariaDB | Yes |
| 22 | SQL Linter by SqlInt | 5.7 | No | — | Yes | — | Standard SQL (ANSI), PostgreSQL, MySQL, SQLite, BigQuery, Snowflake, SQL Server (T-SQL) | Yes |
| 23 | Prettier SQL | 5.6 | 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 |
| 24 | Primova SQL Formatter & Linter | 5.6 | No | — | Yes | — | Standard SQL, PostgreSQL, MySQL, SQLite, MariaDB, T-SQL (SQL Server), BigQuery, Snowflake | — |
| 25 | Public Tools SQL Formatter | 5.6 | 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 |
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 The Geeks Club?
sqlfmt is ranked #1 of 26 with a score of 7.3. Poor SQL is second and TSQLLint 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 how quickly a newcomer can get going: documentation depth, a free tier or trial, and the platforms it runs on.


