SQL Formatter
Coming soonFormat SQL queries with consistent indentation and keyword case.
Tell us this tool matters to you. The tools with the most interest are built first.
What is SQL Formatter?
A SQL formatter rewrites a query with consistent line breaks, indentation and keyword case, without changing what it does. A query copied from a log or an ORM on a single line becomes easy to read and review.
Useful for
- Reading queries captured from logs or ORMs.
- Standardizing SQL before a code review.
- Debugging long queries with many joins and subqueries.
How to use
- Paste your SQL query.
- Choose the dialect and the keyword case.
- Copy the formatted query.
Examples
A one-line query
select id,name from users where active=1 order by nameSELECT
id,
name
FROM
users
WHERE
active = 1
ORDER BY
nameFrequently asked questions
Does formatting change the result of the query?
No. Only whitespace and keyword case change; the query logic stays exactly the same.
Which SQL dialects will be supported?
Standard SQL, PostgreSQL, MySQL, SQL Server and SQLite are planned.
When will this tool be available?
It is on our roadmap. Click "I want this tool" on this page to tell us it matters to you — the tools with the most interest are built first.