SQL Formatter
Format a messy SQL query into readable, indented lines.
About the SQL Formatter
Paste a long single-line query and get it back with each clause on its own line, joins separated out, conditions indented and keywords in the case you prefer. String literals and quoted identifiers are protected so their contents are never touched.
The minify button does the reverse, collapsing a formatted query back to one line for embedding in code.
Frequently asked questions
Which SQL dialects work?
The formatter is dialect-agnostic for standard clauses, so MySQL, PostgreSQL, SQL Server and SQLite queries all format correctly.
Related tools
All Developer โImage to Base64
Convert an image into a Base64 data URI for CSS, HTML or JSON embedding.
Regex Tester
Test a regular expression against sample text with live match highlighting.
Text Diff Checker
Compare two texts and see exactly what was added, removed or kept.
UUID Generator
Generate cryptographically random UUID v4 identifiers in bulk.
.htaccess Redirect Generator
Build redirect, HTTPS, www and caching rules for Apache.
Hash Generator
Generate MD5, SHA-1, SHA-256, SHA-384 and SHA-512 hashes of any text.