SQL Formatter
Paste a one-line or messy SQL query and get it back with capitalised keywords and each major clause on its own line — for MySQL, PostgreSQL and standard SQL alike.
How to use
- Paste your SQL query.
- Click Format SQL — major clauses move to their own lines.
- Copy the formatted query back into your editor.
Note: The formatter normalises the standard clause keywords and joins; it keeps your identifiers, string literals and dialect-specific functions exactly as written.
Frequently Asked Questions (FAQ)
What does the SQL formatter do?
It takes a messy or one-line SQL query and returns it with capitalised keywords and each major clause on its own line.
Which SQL dialects are supported?
MySQL, PostgreSQL and standard SQL.
Will it change my table or column names?
No. It keeps your identifiers, string literals and dialect-specific functions exactly as written; it only normalises clause keywords and joins.
Is the SQL formatter free?
Yes. It is free, needs no signup, and runs in your browser.