Reading a logged query
A one-line query pulled from a slow-query log becomes a readable block where a missing join condition is obvious.
Converts sql to formatted sql in this tab, with nothing sent anywhere.
Find related browser-local tools for nearby tasks without starting another search.
Browse all developer and data toolsA SQL formatter takes a query crammed onto one line and lays it out so a person can read it - each major clause on its own line, columns broken out, keywords capitalised. Long queries arrive as unbroken strings from logs, code and ORMs, and they are almost impossible to review or debug in that state; a missing join condition or a misplaced filter hides easily. This tool reformats your SQL in the browser into a clean, indented shape that makes its structure obvious. It runs entirely on your device, so a query that embeds table names, column names and business logic you would rather keep private never leaves the tab.
A one-line query pulled from a slow-query log becomes a readable block where a missing join condition is obvious.
The dense SQL an ORM emits is formatted so a reviewer can actually check what it does.
Formatting is for inspection and does not validate permissions, transaction boundaries or the effect of a query. Check identifiers, predicates and quoted values against the original, particularly with dialect-specific syntax. Test a changed query in an appropriate development database before running it on production data.
No. It changes only spacing and keyword case, so the formatted query returns exactly the same results as the original.
It handles common SQL well. Very unusual vendor extensions may not lay out perfectly, but the query is never altered in meaning.
SQL Minifier in your browser. Instant, accurate, and nothing is uploaded.
Turn a JSON array into SQL INSERT statements in your browser, with quotes escaped correctly.
CSS Formatter in your browser. Instant, accurate, and nothing is uploaded.