SQL Formatter
Format and beautify SQL in 20 dialects, with uppercase or lowercase keywords.
The formatted SQL appears here.
SQL Formatter FAQ
How do I format a SQL query online?
Paste the query into the SQL box. It is formatted as you type; choose your database under Dialect and click Copy.
Can it change keywords to uppercase?
Yes. UPPERCASE is the default, so select becomes SELECT and count becomes COUNT. Choose lowercase or As typed under Keywords to change that.
Why does it say Parse error?
The formatter could not read the SQL at the line and column shown. Usually a bracket or quote is not closed, or the query uses syntax from another database; select that database under Dialect and try again.
Does formatting change what my query does?
No. Only whitespace and the letter case of keywords change, and SQL ignores both. Quoted text and identifiers are kept exactly.
Is my SQL sent to a server?
No. Formatting runs in your browser, so queries with table names or customer data stay on your device. Nothing is saved.