Home SQL formatter
SQL formatter
Choose standard SQL, MySQL, PostgreSQL, SQL Server, Oracle, SQLite, or BigQuery.
Why this exists
A SELECT stuck on one line makes JOIN and WHERE easy to miss.
A dialect lays the keywords and line breaks of that grammar back down, and a bad bracket is named by its line and column.
-
01How to use it
Paste a query, then pick the dialect, the keyword shape, and the indent.
Example drops in a SELECT with JOIN, WHERE, and GROUP BY.
-
02What you get
The result uses the line breaks and keyword shape of the chosen dialect.
A bad spot names its line and column. If the spot cannot be found, the page asks you to check the grammar and the dialect.
EnteredSELECT
keyword UPPER indent 2 -
03Worth knowing
Whitespace alone clears the result and the note.
Over 1MB, the page shows that it may take a moment only while it is working, then clears that sentence.
Questions
- QDoes the query leave this browser?
- ANo. Formatting finishes in this browser.
- QCan keywords keep the case I typed?
- AChoose Keep and the case stays as written.
- QWhat if a bracket is left open?
- AThe page names the line and the column. If it cannot, it also asks you to check the dialect.