SQL Formatter
Runs locally
Paste a SQL query to format it with consistent indentation and casing, without changing its meaning.
0 / 1,000,000
Formatted SQL
Your data is processed locally in your browser and is not uploaded.
Learn more about this tool⌄
How it works
Formatting is performed by a well-tested, open-source SQL formatting library that runs entirely client-side.
Common use cases
- Cleaning up generated SQL
- Reviewing queries in code review
- Teaching SQL formatting conventions
Frequently asked questions
- Does formatting change how the query runs?
- No, only whitespace and casing are changed. The SQL semantics are preserved.