SQL Formatter
Format messy SQL into readable, indented queries with keyword highlighting.
About the SQL Formatter
Raw SQL queries pasted from logs, APIs, or other tools are often a single unreadable line. This formatter breaks SQL into structured, indented blocks — each main clause on its own line with consistent keyword capitalisation and colour highlighting.
What gets formatted
- Main clauses on new lines: SELECT, FROM, WHERE, JOIN, GROUP BY, ORDER BY etc.
- All SQL keywords uppercased consistently
- Syntax highlighting: keywords in blue, strings in green, numbers in purple, conditions in amber
All processing is client-side — your queries never leave your browser.
Frequently Asked Questions
What SQL dialects are supported?
Standard SQL keywords used in MySQL, PostgreSQL, SQLite, and SQL Server are all handled. Dialect-specific functions are formatted as regular identifiers.
Does this validate my SQL?
No — it reformats structure only. Use your database client to validate against an actual engine.
Are my queries sent to a server?
No. All formatting runs in your browser using JavaScript. Your SQL never leaves your device.