About the SQL Formatter
The SQL Formatter runs entirely in your browser — your data never leaves your machine.
SQL copied from logs, ORMs or one-line console output is nearly impossible to review. This formatter puts every major clause on its own line, indents the body and uppercases keywords so you can see the shape of a query at a glance.
How to use this tool
- Paste your SQL — it can be entirely on one line.
- Choose the indentation and whether to uppercase keywords.
- Press Format SQL and copy the readable result.
What it changes
- Breaks
SELECT, FROM, WHERE, JOIN, GROUP BY, ORDER BY, HAVING, LIMITonto new lines. - Indents the columns and conditions under each clause.
- Optionally uppercases SQL keywords while leaving identifiers alone.
Developer tip
The formatter only changes whitespace and keyword case — it never rewrites expressions, so the output is safe to run. Keep an unformatted copy if your tooling depends on a specific layout.
Who is this tool for?
Backend and data engineers reviewing long queries, and anyone sharing SQL in a code review or ticket.