Debugging a slow query from ORM logs
Before
One-line query with 5 JOINs, unreadable
After
Formatted with proper indentation, JOINs visible
Spotted a JOIN on an unindexed column in 30 seconds. Added the index, query time dropped from 4s to 90ms.
I built this because ORM output and logged queries come out as one giant unreadable line. Paste it, hit Format, and suddenly you can see the JOIN conditions. Works with the SQL dialects I actually use — MySQL, PostgreSQL, SQL Server.
Basic keyword-based formatter for readability — not a full SQL parser, so double-check complex nested queries.
Your files are processed in your browser and never uploaded to any server.
Most of the messy SQL I deal with comes from ORM logs. My tip: format first, then read the JOIN logic. Nine times out of ten, when a query is slow, the problem is a missing index on a JOIN column — and you can only spot that once the query is readable. Also, formatting never changes query logic, so it's safe to run on production queries before sharing them with a teammate.
— Mirza Noman Baig
These are actual measurements from using this tool, not estimates.
Before
One-line query with 5 JOINs, unreadable
After
Formatted with proper indentation, JOINs visible
Spotted a JOIN on an unindexed column in 30 seconds. Added the index, query time dropped from 4s to 90ms.
Before
Raw SQL string in the code, hard to review
After
Formatted version showed the logic clearly
Caught a WHERE clause that would have returned the wrong rows. Would have missed it in the unformatted version.
Before
Query copied from a log, messy
After
Clean formatted SQL in the wiki
New developers could actually read what the query did.
Clean indentation and line breaks make query logic readable.
MySQL, PostgreSQL, SQL Server, and standard SQL syntax.
One-click copy for pasting into your code or documentation.
Your queries never leave your browser. Safe for sensitive SQL.
No. Only whitespace and indentation change. The SQL that runs is exactly the same.
MySQL, PostgreSQL, SQL Server, and other standard SQL. Common clauses like SELECT, JOIN, WHERE, GROUP BY, and ORDER BY are all handled.
No. Everything runs in your browser. Your SQL never leaves your device.
It handles standard SQL statements well. For stored procedures with complex procedural logic, formatting support varies.
This tool focuses on formatting. For minification, a different tool is better suited.