Best SQL Linters and Formatters in 2026

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.

26ranked
14free plans on this page
5 Oct 2026last checked

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.

  1. 01 sqlfmt API yesOSS not on recordFREE yesDOCS 7.4Free
  2. 02 pgFormatter API yesOSS not on recordFREE yesDOCS 7.3Free
  3. 03 Poor SQL API yesOSS not on recordFREE yesDOCS 7.3Free
  4. 04 SQLFluff API yesOSS not on recordFREE yesDOCS 7.2Free
  5. 05 SQLFormat.org API yesOSS not on recordFREE yesDOCS 7.2Free
  6. 06 Squawk API yesOSS not on recordFREE not on recordDOCS 7.0
  7. 07 Sleek API not on recordOSS not on recordFREE yesDOCS 5.9Free
  8. 08 SQLint API not on recordOSS not on recordFREE yesDOCS 5.9Free
  9. 09 Sqruff API not on recordOSS not on recordFREE yesDOCS 5.9Free
  10. 10 TSQLLint API not on recordOSS not on recordFREE yesDOCS 5.9Free
  11. 11 JSQLFormatter API not on recordOSS not on recordFREE yesDOCS 5.8Free
  12. 12 PgSanity API not on recordOSS not on recordFREE yesDOCS 5.8Free
  13. 13 SQL Formatter API not on recordOSS not on recordFREE yesDOCS 5.8Free
  14. 14 SQL Formatter VSCode API not on recordOSS not on recordFREE yesDOCS 5.8Free
  15. 15 sql-tools API not on recordOSS not on recordFREE yesDOCS 5.8Free
  16. 16 prettier-plugin-sql-cst API not on recordOSS not on recordFREE not on recordDOCS 5.1
  17. 17 SQL Enlight API not on recordOSS not on recordFREE not on recordDOCS 5.1
  18. 18 SQL Pretty Printer API not on recordOSS not on recordFREE not on recordDOCS 5.1
  19. 19 SQLCheck API not on recordOSS not on recordFREE not on recordDOCS 5.1
  20. 20 sqlfmt API not on recordOSS not on recordFREE not on recordDOCS 5.1
  21. 21 Valk Guard API not on recordOSS not on recordFREE not on recordDOCS 5.1
  22. 22 Prettier SQL API not on recordOSS not on recordFREE not on recordDOCS 5.0
  23. 23 Primova SQL Formatter & Linter API not on recordOSS not on recordFREE not on recordDOCS 5.0
  24. 24 Public Tools SQL Formatter API not on recordOSS not on recordFREE not on recordDOCS 5.0
  25. 25 RegSQL API not on recordOSS not on recordFREE not on recordDOCS 5.0
Compare all 25 in a table
#PlatformScoreFree planFromFree planPaid fromSupported SQL dialectsAutomatic fixes
1sqlfmt7.4Free planFreeYes—PostgreSQLYes
2pgFormatter7.3Free planFreeYes—SQL-92, SQL-99, SQL-2003, SQL-2008, SQL-2011, PostgreSQL; works with other databasesYes
3Poor SQL7.3Free planFreeYes—T-SQLYes
4SQLFluff7.2Free planFreeYes———
5SQLFormat.org7.2Free planFreeYes—No specific dialects; non-validating and dialect-agnostic—
6Squawk7.0No———PostgreSQLNo
7Sleek5.9Free planFreeYes—PostgreSQL, MySQL, MariaDB, SQLite, SQL Server, OracleYes
8SQLint5.9Free planFreeYes—Standard SQL (BigQuery)Yes
9Sqruff5.9Free planFreeYes—ansi, athena, bigquery, clickhouse, databricks, db2, duckdb, exasol, greenplum, hive, mariadb, materialize, mysql, oracle, postgres, redshift, snowflake, sparksql, sqlite, starrocks, teradata, trino, tsql, verticaYes
10TSQLLint5.9Free planFreeYes—T-SQL (Transact-SQL)Yes
11JSQLFormatter5.8Free planFree——Oracle, SQL Server, MySQL, MariaDB, PostgreSQL, H2, DuckDB, BigQuery, Redshift, Databricks, Snowflake—
12PgSanity5.8Free planFreeYes—PostgreSQL—
13SQL Formatter5.8Free planFree——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/PrestoYes
14SQL Formatter VSCode5.8Free planFree——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-SQLYes
15sql-tools5.8Free planFreeYes—Snowflake, BigQuery, Databricks, PostgreSQL, MySQL, SQL Server—
16prettier-plugin-sql-cst5.1No—Yes—SQLite, BigQuery, PostgreSQL, PL/pgSQL, MySQL, MariaDBYes
17SQL Enlight5.1No———T-SQLYes
18SQL Pretty Printer5.1No—Yes—30+; SQL Server, Oracle, MySQL, PostgreSQL, Snowflake, BigQueryYes
19SQLCheck5.1No—Yes—Microsoft SQL Server, MySQL, Oracle, PostgreSQL, SQLite3No
20sqlfmt5.1No—Yes—PostgreSQL, MySQL, SQLite, SQL Server (T-SQL), BigQueryYes
21Valk Guard5.1No—Yes—PostgreSQLNo
22Prettier SQL5.0No—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, snowflakeYes
23Primova SQL Formatter & Linter5.0No—Yes—Standard SQL, PostgreSQL, MySQL, SQLite, MariaDB, T-SQL (SQL Server), BigQuery, Snowflake—
24Public Tools SQL Formatter5.0No—Yes—Standard SQL, PostgreSQL, MySQL, MariaDB, SQLite, SQL Server, Oracle PL/SQL, BigQuery, Snowflake, Redshift, Spark, Hive, Trino, DuckDB, ClickHouse, Db2, N1QL, SingleStore, TiDBNo
25RegSQL5.0No—Yes—PostgreSQL, MySQL, MariaDB, SQLite, BigQuery, SQL Server, Snowflake, Oracle PL/SQL; the site also states 9 dialects but visibly names 8Yes

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.

More in Developer Tools

All developer tools lists