SQL Formatter
Format and beautify SQL queries for PostgreSQL, MySQL, SQL Server, SQLite, BigQuery and more, with uppercase keywords.
How to use
- 1Paste your SQL and choose the database dialect.
- 2Copy the formatted query.
Frequently asked questions
Does formatting change what my query does?
No. Only whitespace, line breaks and keyword case change; identifiers, values and logic are untouched.
Why choose a dialect?
Databases differ in syntax — backtick identifiers in MySQL, :: casts in PostgreSQL, square brackets in SQL Server. The dialect makes sure these are parsed correctly.
Can it format several statements at once?
Yes. Separate statements with semicolons and each is formatted in turn.