Lay out a SQL query written on one line: keywords upper-cased, each field on its own line and the JOINs aligned. It reads instead of having to be deciphered.
It understands the MySQL, PostgreSQL, SQLite, MariaDB and BigQuery dialects, which is what stops it mangling the syntax specific to each.
How to use it
- Paste the query.
- Choose the dialect.
- Copy the result.
Frequently asked questions
- Does it change what the query does?
- No. It only touches whitespace, line breaks and keyword case; table and column names are left exactly as you wrote them.
- Why does it say it cannot parse it?
- Because there is syntax the chosen dialect does not recognise. Try your engine’s specific dialect before “standard SQL”.
- Can I format several at once?
- Yes, separated by semicolons. They come out separated by a blank line.
Related tools
Minify CSSCSSO: it restructures and merges rules, not just strips spaces.
Minify JavaScriptTerser in the browser, with optional name mangling.
Count words and charactersA live count, reading time and the limits each platform imposes.
Change letter caseUPPERCASE, lowercase, Title Case, camelCase, snake_case and more.
Sort and clean up linesSort, drop duplicates and blanks, number or reverse a list.