Format and prettify SQL queries with proper indentation, keyword casing, and line breaks.
Developers cleaning up raw API responses or minified queries before code review.
Paste your SQL
Copy your query — however messy — and paste it into the editor.
Format or minify
Click Format to prettify with indentation and uppercase keywords, or Minify to collapse it to one line.
Copy the result
Copy the formatted SQL into your code, migration, documentation, or review.
SQL has a habit of arriving as a single unreadable line — copied from application logs, an ORM’s output, or a colleague who never indents. A long SELECT with multiple joins, a WHERE clause, and a GROUP BY crammed onto one line is almost impossible to review or debug, and that is exactly when a subtle logic error hides in plain sight. This formatter rewrites your query with consistent keyword casing, sensible indentation, and line breaks before the major clauses, so the structure jumps out and you can actually read what the query does. It can also minify a query back to a compact single line when you need it for code or a config value. Formatting only touches whitespace and casing — the query logic is untouched — and everything runs in your browser, so your SQL (which may reveal schema or business logic) never leaves your device.
Code review
Format queries consistently before committing so reviewers can read them at a glance.
Debugging
Prettify a complex one-line query to see its structure and spot a misplaced join or condition.
Documentation
Include clean, well-indented SQL examples in docs, wikis, and runbooks.
Learning SQL
See how a query is structured by clause to understand how it executes.
Log analysis
Reformat a query pulled from application logs so you can read and re-run it.
No. All formatting happens in your browser, so your queries never leave your device.
Standard SQL, with MySQL, PostgreSQL, and SQLite syntax generally handled well.
No. Only whitespace and keyword casing change; the logic and results are identical.
Basic procedures format fine. Very complex PL/SQL or T-SQL blocks may not format perfectly.
No — it uppercases SQL keywords (SELECT, FROM, WHERE) while leaving your identifiers as written.
Yes. Minify collapses the query to a single compact line for embedding in code or config.
No. It only formats text; it does not check syntax against a database or execute anything.
Yes — format unlimited queries for free, with no account needed.