SQL Formatter
Uppercase SQL keywords and put major clauses on their own lines.
Quick answer: enter your details below and click Format SQL — your result appears instantly, right here in your browser. Nothing you enter is uploaded or stored.
S
Developer
Enter your details below.
How to use
- Paste your SQL into the box.
- Click Format SQL.
- Read the clause-per-line result.
About this tool
This is a lightweight SQL formatter, not a full SQL parser. It uppercases common keywords and starts SELECT, FROM, WHERE, GROUP BY, ORDER BY, HAVING, JOIN variants, ON and LIMIT on new lines. It does not re-indent subqueries, align columns or validate your SQL, so complex queries may still need manual tidying. Always check the formatted query against the original before running it.
Frequently asked questions
Does it validate my SQL?
No. It only reformats text; a query with a syntax error will still be a syntax error after formatting.
Does it handle subqueries?
Only lightly. Subqueries are not specially re-indented, so long nested queries may still need manual tidying.