About this tool
Turn a one-line query from a log into something you can read and review. Pick your database so dialect-specific syntax is handled.
Making SQL queries readable and reviewable
SQL copied from logs, query builders or monitoring tools usually arrives as a single long line. Reading it is slow, and spotting a missing condition or a wrong join is even harder. Formatting puts each clause on its own line and indents subqueries and conditions, so the logic becomes visible at a glance. Readable SQL is easier to review, explain to teammates and debug when something returns the wrong rows.
Choose the database you are working with, such as MySQL, PostgreSQL, SQL Server or SQLite, so that dialect-specific syntax, quoting and functions are recognised correctly. You can also choose whether keywords appear in uppercase, lowercase or as typed, and switch to minify mode when you need the query back on a single line for a log or a config file. Formatting only changes whitespace and keyword case; it does not change what the query does.
Use formatted SQL in code reviews and documentation, where clarity matters most. When you are tracking down a performance problem, a well-laid-out query makes it easier to see unnecessary joins, missing filters or a SELECT * that fetches far more data than needed. For queries with many conditions, aligning each condition on its own line also makes it easier to comment parts out while testing. If the formatter struggles with a query, it usually points to a syntax problem or a feature from another dialect, which is worth checking before running it. Everything runs in your browser, so queries that include table names, customer data or internal logic are never sent to a server. Consistent formatting across a team also makes diffs in version control much easier to read.
How to use it
- Paste your text into the input box, or open a file from your device.
- Adjust the options. The result updates instantly.
- Copy the result, or download it as a file where offered.
Questions
Does it change what the query does?
No. Only whitespace and, if you choose, keyword case are changed.
Can it minify SQL?
Choose 'Minify' to collapse the query onto a single line.
Last reviewed 16 October 2026.
