Format messy SQL into readable queries with proper clause breaks and keyword casing, without touching string literals.
Text inside quotes and comments is never reformatted, so a keyword in a string stays exactly as you wrote it.
Drop in a query of any length, whether it came out of a log file, an ORM, or a colleague's message with all the line breaks stripped out of it.
Uppercase keywords are the long-standing convention and make the clause structure jump out. Lowercase suits teams whose style guide prefers it. Either way the formatting is identical.
Each major clause starts on its own line, joins and conditions are indented under it, and the select list is broken up one column per line so a long query becomes readable.
No. Formatting happens in your browser in JavaScript. That matters for SQL in particular, because queries often contain table names, column names and filter values you would not want to paste into a remote service.
No, and this is the thing most simple formatters get wrong. Quoted strings and comments are captured before any rewriting happens, so a value like 'FROM headquarters' stays on one line and keeps its original casing.
The formatter works on the shared syntax of PostgreSQL, MySQL, SQL Server, SQLite and most other engines. It formats layout rather than parsing a specific dialect, so vendor-specific functions pass through untouched.
No. It is a formatter, not a parser or a linter. Invalid SQL will still be laid out, so a query that looks tidy here can still fail when your database runs it.
Not currently. The tool is built for making queries readable in reviews, tickets and documentation, which is the direction people usually need.
All existing whitespace is collapsed before the query is laid out again from scratch. That is what makes the result consistent no matter how the query looked when it arrived.
WITH clauses and set operators such as UNION are recognised and placed on their own lines. Deeply nested subqueries are formatted but not indented by nesting level.
Yes, completely free with no sign-up and no limits, like every tool in the Pinkontin toolbox.
Free online JSON formatter and validator. Format, minify and validate JSON with syntax highlighting and instant error detection.
Open ToolIndent, validate and minify XML. Catches parse errors before you paste a broken feed or sitemap into production.
Open ToolCompare two texts or code snippets line by line and see exactly what was added, removed and left alone.
Open Tool