SQL Formatter
Paste a messy query and get clean, indented SQL with keywords uppercased and clauses on their own lines. Runs in your browser, nothing uploaded.
A cleaner query in one paste
This SQL formatter uppercases the keywords you know (SELECT, FROM, WHERE, the JOIN family, GROUP BY, ORDER BY, LIMIT and more), drops each major clause onto its own line, and indents AND and OR underneath so a long condition is easy to scan. Quoted strings are left untouched, so your literals stay exactly as written, and your comments are preserved too: both -- line comments and /* ... */ block comments are pulled out and put back on their own line, so nothing after a comment ever gets dropped. It is a fast convenience formatter rather than a full parser, which is all you usually need to make a query readable. Everything runs in your browser.
The query you will run again next week
Good queries get reused, then lost in a sea of terminal history. Relic keeps an end-to-end encrypted, searchable memory of everything you copy, on every device, for as long as you want. The formatter is free, and that query you just cleaned up is one search away the next time you need it.