Postgres EXPLAIN Output Formatter

Paste the output of EXPLAIN or EXPLAIN ANALYZE from PostgreSQL. The formatter pretty-prints the plan tree, highlights nodes that took unusually long, flags sequential scans on large tables, sort spills to disk, and over-estimated row counts. Useful for query optimisation when you don't want to spin up pgAdmin or pgMustard.

How to use the Postgres EXPLAIN Output Formatter

Run EXPLAIN ANALYZE on your slow query (or just EXPLAIN if you can't execute it), paste the output here. The formatter parses the indented tree, highlights slow nodes (red), flags sequential scans on large tables, and shows the total estimated cost vs actual time.

Reading a Postgres query plan

EXPLAIN and EXPLAIN ANALYZE reveal how PostgreSQL will run a query — which scans, joins, and sorts it picks and what they cost — but the raw output is a dense, deeply indented tree where the one expensive node, and the telling gap between estimated and actual row counts, are easy to miss.

This parses the text-format plan, pretty-prints the tree, and highlights the parts worth attention: slow nodes, sequential scans on large tables, sorts that spill to disk, and estimates that diverge from reality. It works on the plan, not the SQL — to reformat the query itself, the SQL prettifier or the fuller SQL formatter handle that before you run EXPLAIN on it.

Common use cases

  • Find the slow node — spot the step dominating query time.
  • Catch a seq scan — flag a sequential scan that wants an index.
  • Detect sort spills — see when a sort spilled to disk.
  • Estimated vs actual — find where the planner mis-estimated row counts.
  • No pgAdmin needed — read a plan directly in the browser.

Frequently asked questions

Which EXPLAIN format does it expect?

The default text format, from EXPLAIN or EXPLAIN ANALYZE.

Do I need EXPLAIN ANALYZE?

It is richer, with actual times and rows, but plain EXPLAIN works when you cannot execute the query.

Does it format the SQL too?

No — it reads the plan; reformat the query with the SQL prettifier or SQL formatter.

What does it highlight?

Slow nodes, large-table sequential scans, disk sort spills, and estimate-versus-actual row gaps.
Embed this tool on your site

Free to embed, no attribution required (but appreciated). Paste this where you want the tool to appear: