SQL Formatter
Beautify SQL queries with proper indentation and line breaks. Nothing is uploaded — it works offline.
Format and beautify SQL queries online — SELECT, INSERT, UPDATE, DELETE, JOINs and subqueries — with clean indentation, line breaks after commas and optional keyword uppercasing. Paste messy SQL from logs or code and get readable, copy-ready SQL instantly, entirely in your browser.
How to use the SQL Formatter
- Paste your SQL query into the input box.
- Choose keyword case and indent size, then hit Format.
- Copy the formatted SQL back into your editor or documentation.
Frequently asked questions
How do I format SQL online?
Paste your query above and click Format. The formatter breaks keywords onto new lines, indents by parenthesis depth and puts each column on its own line.
Does it support PostgreSQL, MySQL and SQL Server?
Yes — the formatter is dialect-neutral and works with any SQL: standard keywords, JOINs, subqueries and common clauses.
Can it uppercase keywords?
Yes — the Uppercase keywords option is on by default; toggle it off to keep your original casing.
Is my SQL uploaded anywhere?
No. Formatting runs entirely in your browser, so private queries never leave your machine.