DeveloperAdded
SQL Formatter
Put line breaks and indentation into a query that arrived as one long line. Read your SELECT before you debug it; the formatter never rewrites your strings.
Format a SQL query
208 / 232Result
WaitingRun the tool and the result appears here. Copy it or download it — nothing leaves this tab.
Privacy
Queries often contain table names and values. They are formatted in this tab and never sent to a server.
How to use it
Paste the query. Comments and quoted strings are kept as they are.
Press “Format SQL”. Keywords move to their own lines and clause bodies are indented.
Copy the result back into your client. Choose lower-case keywords if your team prefers them.
When to use it
Debugging a generated query
ORMs print one enormous line. Split it before you look for the missing join condition.
Code review
Paste a migrated query into the ticket so reviewers can read the shape without an editor.
Logs and slow-query tables
Reformat a statement copied out of a log to see whether the index columns match the WHERE clause.
Questions
Does it parse SQL properly?
It is a whitespace formatter, not a parser. It knows the keyword list and avoids touching quoted strings, but it will not validate your syntax.
Which dialects are supported?
Standard keywords used by PostgreSQL, MySQL, SQL Server and SQLite. Dialect-specific syntax is left alone.
Can it minify instead?
Not yet — the reverse direction is a smaller win. Use your editor's join-lines command, or the JSON minifier for JSON.