SQL Formatter
Format SQL queries with uppercased keywords and clause-by-clause line breaks for readability.
Related tools
All JSON, XML & formats tools →SQL Formatter works straight from this page — free, instant, nothing to install. You will find it under JSON, XML & formats, with ISO 8601 Date Formatter and XML Formatter / Validator for the neighbouring cases.
How to use it
- Open the tool — no signup or install needed.
- Enter your input or adjust the available options.
- Get your result instantly, then copy or download it.
Frequently asked questions
What does SQL Formatter do?
Format SQL queries with uppercased keywords and clause-by-clause line breaks for readability.
When would I actually use this?
Making a machine-generated blob readable, finding the character where a parse fails, and shrinking a file before it ships.
What is the most common mistake?
Assuming valid means correct. A document can parse cleanly and still have the wrong shape for whatever will read it — validation checks the syntax, not the schema.
Is there a tool for the next step?
XML Formatter / Validator is the closest one after this: Pretty-print, minify and check whether XML is well-formed, all in your browser.
What else is worth having open alongside it?
YAML Formatter / Validator and JSON formatter — they come up in the same task often enough to be worth a second tab.
Where do the figures come from?
Parsing and serialisation follow each format's specification. Key order and whitespace are not semantically meaningful in JSON or YAML, so a reformatted document is equivalent even when the bytes differ.