Paste any SQL query, then beautify or minify it.
A long, single-line SQL query is hard to read and even harder to debug. This free SQL formatter instantly rewrites it with clear line breaks, consistent indentation and uppercase keywords, so the structure of your SELECT, JOIN, WHERE and GROUP BY clauses jumps out.
Need the opposite? The Minify button compresses a query back to a single line for pasting into a terminal, a log or an ORM. Both actions happen entirely in your browser, so no query ever leaves your machine.
Paste or type your SQL, then tap Beautify. The tool uppercases SQL keywords and breaks the query onto separate lines at the main clauses. Tap Minify to strip all unnecessary whitespace into one compact line, and Copy to put the result on your clipboard.
Paste messy SQL and format it with clean indentation and uppercase keywords, or minify it to a single line. Runs entirely in your browser.