โ— Barokit

๐Ÿ—ƒ๏ธSQL Formatter

Pretty-print complex SQL queries. Supports 14 dialects including MySQL, Postgres, SQLite, MSSQL, BigQuery, and Snowflake. Useful for cleaning up code before review, analyzing ORM-generated queries, and recovering one-line queries from logs.

๐Ÿ”’ Browser-basedโœ“ No watermarkโœ“ No signup

How to use

  1. 1Paste your SQL.
  2. 2Choose the dialect.
  3. 3Press format.

FAQ

Multiple queries?+

Queries separated by semicolons (;) are formatted together.

Why choose a dialect?+

Each DB has slightly different reserved words, functions, and operators โ€” picking the dialect gives more accurate formatting. MySQL uses backticks, Postgres uses double quotes, etc.

My query is too long to read. Auto line-break?+

After formatting, SELECT/FROM/WHERE/JOIN are line-broken for much better readability.

Does it clean up ugly ORM-generated queries?+

Yes. Long queries from ORMs like Sequelize, TypeORM, and Prisma format cleanly.

Are comments preserved?+

Both single-line (--) and block (/* ... */) comments are preserved.

DDL and migrations too?+

DDL like CREATE/ALTER/DROP and DML like INSERT/UPDATE/DELETE are all formatted.

Related tools