Prettier SQL
Prettier SQL: A flexible open-source SQL formatter for Prettier workflows, not a verified linter. Ranked #8 of 25 in SQL Linters and Formatters by our editors (8.0/10); pricing: Free plan; best for prettier users formatting SQL and embedded code.
At a glance
- Editor score8.0 / 10
- PricingFree plan
- Best forPrettier users formatting SQL and embedded code
- Free planYes
- Paid fromFree
- Supported SQL dialectssql, 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
- Automatic fixesYes
- Facts checked20 Sep 2026

Where it wins
- Free, open-source formatting across many SQL dialects
- Formats SQL-in-JS tagged template literals through prettier-plugin-embed
- Detailed controls for casing, indentation, spacing, and layout
Where it doesn't
- No verified linting or custom-rule support
- No verified CI features
- Requires a self-hosted local Prettier setup
Our verdict on Prettier SQL
Prettier SQL is an open-source plugin for formatting SQL files through Prettier, with support for SQL embedded in JavaScript tagged template literals. It is aimed at developers and teams already using Prettier who want SQL formatting within the same local workflow. The plugin can use sql-formatter or node-sql-parser and supports language and database options including PostgreSQL, MySQL, BigQuery, Snowflake, SQLite, Trino, and others. It runs from the Prettier command line and can be installed through npm or Yarn.
Its strongest fit is configuration depth. Published options cover keyword, datatype, function, and identifier casing, along with indentation, operator newlines, expression width, and query spacing. Configuration works through Prettier configuration files, and the category specifications show automatic fixing and config-file support. For mixed-language codebases, prettier-plugin-embed adds formatting for SQL-in-JS tagged template literals, while the available parser choices provide flexibility across supported dialects and databases.
The main boundary is scope: Prettier SQL is positioned as a formatter rather than a complete SQL quality or governance tool. There is no verified linting, custom-rule, or CI feature set, so teams seeking those capabilities should consider a product with explicit support for them. Choose Prettier SQL when free, local, configurable formatting and Prettier ecosystem compatibility matter most. It is less suitable when SQL linting, organization-specific rules, or dedicated continuous-integration workflows are central requirements.
Your product? Our editors can test Prettier SQL in depth and publish a review, labelled as paid · from $149/mo →
Prettier SQL pricing
Prettier SQL fact sheet
| Free plan | Yes |
|---|---|
| Paid from | Free |
| Supported SQL dialects | 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 |
| Automatic fixes | Yes |
| Custom rules | Not verified |
| Editor extensions | Not verified |
| CI/CD integration | Not verified |
| Configuration file | Yes |
| Deployment | Self-hosted |
| Support | Community, Docs |
| Built for | Solo, Small business, Mid-market, Enterprise (editorial estimate) |
| Integrations | 4 integrations: Prettier, prettier-plugin-embed, sql-formatter, node-sql-parser |
| Pricing | Free plan |
| Website | github.com |
| Facts checked | 20 Sep 2026 |
Prettier SQL integrations
Prettier SQL lists 4 integrations on its own site.
- Prettier
- prettier-plugin-embed
- sql-formatter
- node-sql-parser
Alternatives to Prettier SQL
- SQLFluffConfigurable SQL linting with autofix, templating, plugins, and CI workflows.9.4
- SqruffA focused open-source choice for dbt teams needing linting, formatting, and CI workflows.9.1
- pgFormatterA configurable, open-source formatter for PostgreSQL-focused SQL workflows.8.8
See all Prettier SQL alternatives →
Prettier SQL vs the competition
- Prettier SQL vs SQLFluff
- Prettier SQL vs Sqruff
- Prettier SQL vs pgFormatter
- Prettier SQL vs SQL Enlight
- Prettier SQL vs TSQLLint
- Prettier SQL vs SQL Formatter
Compare Prettier SQL with any tool side by side →
Used Prettier SQL? Be the first to review it
The editor score above is our own research. What this page doesn't have yet is a reader's view — what you used Prettier SQL for, what worked and what didn't. No stars are seeded and no review is paid for; an editor reads every one before it appears.
Write a reviewTwo minutes · verified accounts only · read by an editor before it appears
Featured on iTechGuides
Prettier SQL is listed in our SQL Linters and Formatters directory. Add the badge to your site — it links back to this page.
<a href="https://www.itechguides.com/products/prettier-sql/"><img src="https://www.itechguides.com/best/badge/prettier-sql.svg" alt="Featured on iTechGuides" width="230" height="46"></a>
Reviewed by iTechGuides Editors · Editorial team · Updated Oct 2026
Advertiser disclosure: iTechGuides is reader-supported. Vendors can pay for top positions in our rankings and for a place on other products' pages, and we may earn a commission when you click some links. Bought places stand at the number bought; this page and our disclosure say so. Paying vendors may get a fuller, more detailed review from our editors, and that review can change their score. How we rank.
Last updated · How we research and update


