Freedom251 › SQL Linters and Formatters
Prettier SQL

What Prettier SQL is
Prettier SQL is a free, self-hosted plugin that adds SQL formatting support to Prettier. It formats SQL files using sql-formatter or node-sql-parser, with documented dialect support including BigQuery, DB2, Hive, MariaDB, MySQL, PostgreSQL, Snowflake, SQLite, T-SQL, Trino, and others. Package metadata also lists dialects such as Redshift, ClickHouse, Spark, and Flink SQL. Formatting options cover casing for keywords, data types, functions, and identifiers, plus indentation style and logical-operator line breaks. With prettier-plugin-embed, it can format SQL inside tagged template literals in JavaScript. Installation is shown through npm or Yarn, with configuration in a Prettier config file; automatic fixes and configuration are supported. The package requires Node.js v14.18.0 or later and lists Prettier ^3.0.3 as a peer dependency. It is distributed under the MIT license. The README says the plugin is under development and its formatting may not always match Prettier's formatting.
Who it suits
Prettier SQL suits developers using Prettier who want SQL formatting across supported dialects, including SQL embedded in JavaScript tagged templates. It requires Node.js v14.18.0 or later and a self-hosted setup.
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.
Limits
The package is under development, and its README says formatting may not always match Prettier's formatting.
Plans
| Plan | Billed and limits | Price |
|---|---|---|
| MIT-licensed open-source package | Prettier plugin · requires Node.js v14.18.0+ | Free |
As github.com lists them, read 8 Oct 2026. The maker's own page has the final word.
Getting started
- Install the package with npm or Yarn
- Use Node.js v14.18.0 or later
- Ensure Prettier ^3.0.3 is available as a peer dependency
- Add the plugin to a Prettier configuration file
- Use prettier-plugin-embed when formatting SQL in tagged JavaScript templates
Verdict
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.
Questions
Is Prettier SQL free?
Yes. It is a free plan distributed as an MIT-licensed open-source package, priced at $0.
Which platforms does it support?
It is self-hosted.
Which SQL dialects are supported?
The documented lists include BigQuery, DB2, Hive, MariaDB, MySQL, PostgreSQL, Snowflake, SQLite, T-SQL, Trino, ClickHouse, Flink SQL, and others.
How is it configured?
Settings are provided through a Prettier configuration file, including casing, indentation, and logical-operator line breaks.
What does it require?
Node.js v14.18.0 or later and Prettier ^3.0.3 as a peer dependency.
Facts from Prettier SQL's own pages
- Compatibility
- The package metadata lists Prettier ^3.0.3 as a peer dependency. · github.com, 8 Oct 2026
- Development status
- The README says the plugin is under development and may not always match Prettier's formatting. · github.com, 8 Oct 2026
- Formatting options
- Options include keyword, data type, function, and identifier casing, indentation style, and logical operator line breaks. · github.com, 8 Oct 2026
- How it works
- The plugin uses sql-formatter or node-sql-parser to format SQL files. · github.com, 8 Oct 2026
- License
- The package is distributed under the MIT license. · github.com, 8 Oct 2026
- Maker
- The package metadata names JounQin as its author, and the repository describes itself as a collection of Prettier plugins. · github.com, 8 Oct 2026
- Purpose
- prettier-plugin-sql adds SQL formatting support to Prettier. · github.com, 8 Oct 2026
- Requirements
- The package requires Node.js v14.18.0 or later, including supported LTS versions. · github.com, 8 Oct 2026
- Setup
- The README shows installation through npm or Yarn and configuration through a Prettier config file. · github.com, 8 Oct 2026
- SQL in JavaScript
- With prettier-plugin-embed, it can format SQL inside tagged template literals. · github.com, 8 Oct 2026
- Supported dialects
- The documented sql-formatter languages include BigQuery, DB2, Hive, MariaDB, MySQL, PostgreSQL, Snowflake, SQLite, T-SQL, Trino, and others. · github.com, 8 Oct 2026
Where Prettier SQL stands on Freedom251
- SQL Linters and Formatters#11 of 26