SQL Formatter
Beautify SQL by upper-casing keywords and putting each clause on its own line for readability. Runs entirely in your browser — nothing is uploaded.
Document queries in Markdown? Markdown preview · JSON queries? JSON formatter · compare schemas: JSON diff checker.
How to format SQL
Paste a query and click Format. Keywords are cased and clauses are placed on their own lines for readability. This is formatting only — review the result before running it.
FAQ
What does it do?
It tidies a SQL query: keywords use your selected case and each major clause (SELECT, FROM, WHERE, JOIN, GROUP BY, ORDER BY…) starts on its own line, with columns indented.
Is my SQL sent anywhere?
No. Formatting runs entirely in your browser — nothing is uploaded.
Which dialects are supported?
Choose MySQL, PostgreSQL, or T-SQL for the matching keyword table. The tool performs formatting only and does not parse or execute a database-specific query plan.
Last updated: