dev

SQL Format + Explain

Format a SQL query and break it down into plain-English clause-by-clause annotations. Identifies SELECT/FROM/JOIN/WHERE/GROUP BY/HAVING/ORDER BY/LIMIT, aggregates, joins, CTEs, and statement type.

Loading…

About SQL Format + Explain

Paste a SQL query and get back a pretty-printed version along with a clause-by-clause plain-English breakdown. Each clause — SELECT, FROM, JOIN, WHERE, GROUP BY, HAVING, ORDER BY, LIMIT, and the rest — is identified with its body and a one-line explanation of what it does. Useful for code review, onboarding new engineers, explaining queries to non-DBAs, or auditing a query you inherited. Runs entirely in your browser; no upload, no LLM.

Category
dev
Input
Accepts: text/plain or application/sql.
Output
Outputs: application/json.
Cost
Free, runs in your browser
Memory
low
Privacy: SQL Format + Explain runs entirely on your device. Files you provide never leave your browser — no uploads, no server, no tracking. The page works offline once loaded.

Common uses

  • Document a complex query in a PR description without writing the prose yourself.
  • Explain a join-heavy report to a stakeholder who doesn't speak SQL.
  • Audit unfamiliar SQL — see at a glance what every clause is doing.
  • Detect features (aggregates, joins, grouping, sorting, limiting) in a single pass.
  • Format SQL pasted from a screenshot or chat that lost its whitespace.

Frequently asked questions

Which SQL dialects does it support?

Standard SQL, PostgreSQL, MySQL, SQLite, and BigQuery — selectable via the Dialect parameter. Dialect mainly affects formatting (e.g., backtick vs. quoted identifiers); the clause-by-clause breakdown is the same across dialects.

Does it run my query?

No. The tool only parses and explains the query — it never executes it. Safe to paste production SQL.

Is the query sent anywhere?

No. The entire format and explanation happens client-side. You can disconnect your network and it still works.

Will it explain a CTE-led query?

Yes — the tool detects `WITH` and names the defined CTEs in the explanation. The body of each CTE is treated as a sub-query and gets its own clause breakdown when expanded.

Keywords

  • sql
  • explain
  • format
  • annotate
  • query
  • database
  • breakdown

Try next