Developer tool
SQL Formatter
Paste a query to break SELECT, FROM, WHERE, JOIN, and ORDER BY onto separate lines.
Processed in your browser. The text is not sent to our servers.
How to format SQL
- Paste a SQL statement.
- Click Format SQL.
- Copy the statement with each main clause on its own line.
The formatter puts SELECT, FROM, WHERE, JOIN, and ORDER BY on their own lines and indents clauses inside parentheses. Text inside quotes is left unchanged.
Frequently asked questions
Will this fix an invalid query?
No. It only breaks and indents the main clauses. Check the statement before you run it.
Is the SQL uploaded?
No. Formatting runs in your browser.