Home โบ Developer Tools โบ SQL Formatter
๐๏ธ SQL Formatter
Beautify messy SQL with uppercase keywords and clean line breaks, or minify it to one line.
About this SQL Formatter
One-line SQL copied from logs or application code is painful to read and debug. This formatter uppercases the keywords, puts each major clause (FROM, WHERE, JOIN, GROUP BY, ORDER BY) on its own line and indents list items and conditions, turning a wall of text into a query you can actually follow. The minify button does the opposite when you need a query compact for embedding.
How to use it
- Paste your SQL into the box.
- Click Beautify SQL for the readable layout, or Minify for one line.
- Read the result in the box below.
- Copy it back into your editor, console or query tool.
Example
'select id, name from users where age > 18 order by name' becomes a SELECT list, then FROM, WHERE and ORDER BY each starting on their own line with keywords in capitals.
Frequently asked questions
Does it understand my database dialect?
It handles standard SQL shared by MySQL, PostgreSQL, SQLite and SQL Server. Vendor-specific syntax is left as-is rather than rewritten.
Is my query uploaded anywhere?
No โ formatting happens entirely in your browser, so private schemas and data in your queries stay on your device.
More Developer Tools
Password Generator
Create strong random passwords in your browser with a live entropy strength meter.
QR Code Generator
Turn any text or link into a QR code you can save โ generated right in your browser.
Base64 Encoder & Decoder
Encode text to Base64 or decode Base64 back, with safe UTF-8 handling for any language.
JSON Formatter
Format, minify and validate JSON, with clear error positions and quick structure stats.
URL Encoder & Decoder
Encode or decode URLs and query text safely, with component or full-URL modes.
JSON to CSV Converter
Convert a JSON array of objects to CSV, or turn CSV back into clean JSON.