SQL formatter & beautifier
Paste a query to reindent it with aligned clauses and uppercased keywords. Supports standard SQL dialects — all processed locally in your browser.
Loading tool…
What the SQL formatter does
It re-lays out your query with each clause on its own line, consistent indentation, and uppercased keywords so long statements become readable at a glance.
Why format SQL
Consistent formatting makes reviews faster, diffs smaller, and complex joins and sub-queries far easier to reason about across a team.
Dialect support
It uses a general-purpose SQL grammar that handles common ANSI syntax used by PostgreSQL, MySQL, SQLite, and similar engines.
How to sql formatter
- Paste your SQL query into the input pane.
- Click Convert to reformat it.
- Review the aligned, uppercased output.
- Copy it back into your editor or migration file.