Skip to content

SQL Formatter

Developer utilities · Done in 3 steps

Stays on your deviceFree · No sign-up
  1. 1Paste your SQL
  2. 2
  3. 3
Loading tool…

About

Format and beautify SQL for PostgreSQL, MySQL, SQL Server, BigQuery, Snowflake and more, with keyword case, indent and layout options.

How to use it

  1. 1Paste a query or open a .sql file.
  2. 2Choose your SQL dialect.
  3. 3Set keyword case, indentation and layout.
  4. 4Copy or download the formatted SQL.
You give
One or more SQL statements
You get
Consistently indented SQL
Good to know
Formatting only — queries aren't validated against a schema or executed. Very dialect-specific syntax may need the matching dialect selected; procedural blocks (PL/pgSQL bodies) are formatted as plain text.
Privacy
Processed on your device. Nothing is uploaded, stored or logged.
Last tested
2026-10-28

FAQ

Does it change what my query does?

No. Only whitespace and the case of keywords change. Identifiers and string values are left as you wrote them.

Which dialect should I pick?

The database you run the query on. Dialects differ in quoting (`backticks` vs "quotes"), parameters and special keywords, and the formatter needs to know which applies.

Go further with AI