Interactive SQL execution plan diagrams, structural Before vs After plan diffs, deadlock cycle graphs, and SQL migration safety checks for VS Code, Cursor, and Windsurf.
Running 100% locally in WebAssembly via @culpritsql/plans and @culpritsql/plan-viewer.
Try Online at explain.culpritsql.com · Features · Shortcuts · Engines · Security
- Zero-Click Custom Editor: Double-click any
*.sqlplan,*.explain.json,*.plan.json, or*.xdlfile in Explorer to open an interactive operator flow diagram or deadlock wait graph. Live edits stream directly into the viewer. - Interactive Plan & Deadlock Studio (
Cmd+Shift+E/Ctrl+Shift+E): PasteEXPLAIN (ANALYZE, BUFFERS)output, Showplan XML, MySQLEXPLAIN ANALYZE, or server deadlock logs without creating scratch files. - Side-by-Side Structural Plan Diff: Select two plan files in Explorer and click Culprit: Compare Two Execution Plans to inspect measured speedup, cost ratio,
Seq ScantoIndex Scanaccess flips, and operator property changes with synchronized pan and zoom. - Inline CodeLens & SQL Migration Safety Diagnostics:
- Adds
⚡ Culprit: Paste EXPLAIN · ⇄ Compare Planlenses above queries in.sqlfiles andsql\...`/Prisma.$queryRaw`...`` template literals in TypeScript and JavaScript. - Flags risky SQL constructs before production deploy:
UPDATE/DELETEwithoutWHERE,CREATE INDEXwithoutCONCURRENTLYon existing tables,CREATE INDEX CONCURRENTLYinsideBEGIN ... COMMIT, non-sargableWHERE LOWER(col) = ...predicates, and leading-wildcardLIKE '%...'filters.
- Adds
- Redacted Share Links & Standalone Exports: Export single-file HTML or Markdown reports, or generate compressed
explain.culpritsql.com/#s=z1...URLs with SQL string and numeric literals scrubbed automatically. - Native Theme Sync: Follows VS Code, Cursor, and Windsurf Dark, Light, and High Contrast themes automatically.
Double-click any .sqlplan, .explain.json, .plan.json, or .xdl file to inspect interactive operator graphs, bottleneck fixes, and lock wait cycles with one-click redacted exports:
Catch blocking CREATE INDEX, CREATE INDEX CONCURRENTLY inside transactions, unbounded UPDATE/DELETE, non-sargable LOWER(col) filters, and leading-wildcard LIKE '%...' scans directly in .sql migrations and TypeScript sql\...`/Prisma.$queryRaw`...`` queries:
Open the included demo/ folder directly in VS Code, Cursor, or Windsurf to test custom plan/deadlock editors, Before vs After plan comparison, inline SQL CodeLens, and migration safety diagnostics immediately:
git clone https://github.com/culpritsql/culprit-vscode.git
code culprit-vscode/demo| Command | Shortcut | Description |
|---|---|---|
Culprit: Open SQL Plan & Deadlock Studio |
Cmd+Shift+E (Ctrl+Shift+E) |
Opens the interactive Plan, Compare, and Deadlock Studio panel |
Culprit: Explain Plan or Deadlock from Clipboard |
Command Palette / Context Menu | Parses and renders EXPLAIN or deadlock output directly from your clipboard |
Culprit: Explain Selected Plan / Deadlock |
Editor Selection Context Menu | Visualizes the highlighted execution plan, deadlock log, or SQL query |
Culprit: Compare Two Execution Plans |
Explorer Context Menu (2 files) | Opens structural Before vs After comparison for selected plan files |
Culprit: Open Redacted Link on explain.culpritsql.com |
Command Palette | Scrubs SQL literals, compresses with deflate-raw, and opens in browser |
| Engine | Execution Plan Formats | Deadlock Formats |
|---|---|---|
| PostgreSQL & TimescaleDB | EXPLAIN (ANALYZE, BUFFERS, WAL, VERBOSE, FORMAT JSON) & plain psql text |
ERROR: deadlock detected + DETAIL: server log excerpts |
| SQL Server & Azure SQL | .sqlplan Showplan XML (Estimated & Actual runtime counters, missing indexes, spills) |
.xdl / Extended Events <deadlock> XML graphs |
| MySQL & MariaDB | EXPLAIN FORMAT=JSON & MySQL 8.0+ EXPLAIN ANALYZE tree text |
SHOW ENGINE INNODB STATUS (LATEST DETECTED DEADLOCK) |
| YugabyteDB | EXPLAIN (ANALYZE, DIST, FORMAT JSON) with DocDB RPC & storage read metrics |
PostgreSQL-compatible deadlock log excerpts |
| SQLite / LibSQL | EXPLAIN QUERY PLAN (--SCAN / --SEARCH tree and classic tabular output) |
N/A |
| Setting | Default | Description |
|---|---|---|
culprit.codeLens.enabled |
true |
Show inline Paste EXPLAIN and Compare Plan CodeLenses above SQL statements and tagged templates. |
culprit.diagnostics.enabled |
true |
Enable static SQL query and migration safety diagnostics in .sql and .ts/.tsx/.js files. |
culprit.share.redactLiterals |
true |
Scrub SQL string and numeric literals before generating shareable links or exported reports. |
- 100% Local WebAssembly Execution: Plan parsing, structural diffing, deadlock cycle detection, and HTML/Markdown rendering run locally inside
@culpritsql/plansWebAssembly. No database credentials, queries, or plans are uploaded to any server. - Strict Webview Content Security Policy: Every Webview renders under a per-session cryptographic
nonce(default-src 'none'; script-src 'nonce-...' 'wasm-unsafe-eval') with zero remote scripts or telemetry beacons. - Client-Side Redacted Sharing: Sharing to
explain.culpritsql.comis strictly opt-in, scrubs SQL literals by default, and stores the compressed payload inside the URL#s=z1...fragment so the payload is never sent in HTTP request paths.
MIT License. Copyright (c) 2026 Cristian Pufu.

