SQL formatter
Format queries across PostgreSQL, MySQL, SQLite, BigQuery and more.
Formatting & validation100% client-side
Input
Output
Recent
Nothing here yet.
About this tool
Long queries written under deadline pressure — or generated by an ORM and pulled out of a log — are hard to reason about until the clauses line up. This tool re-indents SQL with consistent keyword casing and clause breaks, so joins and predicates become scannable.
Several dialects are supported, because formatting rules differ: PostgreSQL, MySQL, SQLite, MariaDB, BigQuery, Snowflake, Transact-SQL and standard SQL. Pick the one your database actually speaks for the most faithful result.
How to use it
- 1Paste your query into the input panel.
- 2Select the SQL dialect and keyword casing.
- 3Copy the formatted query back into your editor.
Privacy
This tool runs entirely in your browser. Nothing you type or paste is sent to a server, and your local history is stored only on this device.
Related tools
- JSON formatter & validatorPretty-print, minify and validate JSON with precise error positions.
- XML formatter & validatorIndent, minify and well-formedness-check XML documents.
- JWT decoder & validatorDecode header and payload, inspect claims and check expiry.
- Regex testerTest regular expressions live, with highlighted matches and capture groups.
