Side by side
Prettier SQL vs sqlfmt
Both stand on sql linters and formatters. Which one you can start free with, which one lets you read the code, and what each costs once you pay.
Free plan Self-hosted
Prettier SQL adds configurable SQL formatting to a self-hosted Prettier setup, with broad listed dialect support. Its development status and Node.js requirement are important considerations.
Visit Prettier SQL Free plan APIWeb
Choose sqlfmt for browser-based SQL formatting and validation across its five supported dialects, especially if the Free plan's daily allowance is enough. Choose Pro at $9 a month for unlimited analyses and API access.
Visit sqlfmtThe facts
| Prettier SQL | sqlfmt | |
|---|---|---|
| Free plan | Yes | Yes |
| Open source | Not published | Not published |
| Runs on | Self-hosted | API, Web |
| Lowest paid plan | Free or on request | Pro: $9 a month |
| Plans published | 1 | 2 |
| Maker | Not published | Not published |
| Website | github.com | sqlfmt.app |
| On sql linters and formatters | #11 of 26 | #15 of 26 |
Prettier SQL: what it does well
- Free package distributed under the MIT license.
- Supports a wide range of SQL dialects.
- Formatting options include casing and indentation.
- Can format embedded SQL with prettier-plugin-embed.
- Configuration files and automatic fixes are supported.
What to know first
- Requires Node.js v14.18.0 or later.
- README describes the plugin as under development.
- Formatting may not always match Prettier.
sqlfmt: what it does well
- Formats with configurable keyword case, indentation, commas, and line width.
- Reports syntax errors with exact line and column.
- Supports PostgreSQL, MySQL, SQLite, T-SQL, and BigQuery.
- Formatting and validation run locally in the browser.
- Free plan includes saved snippets and history.
What to know first
- Free plan is limited to 20 analyses per day.
- REST API access requires Pro.
Alternatives to Prettier SQL Alternatives to sqlfmt The whole list