Explain any SQL query in plain English. Part of the builtbyzero lineup.
Paste a SQL query, get a structured plain-English explanation: SELECT clause, FROM/JOINs, WHERE filters, GROUP BY, ORDER BY, LIMIT — clause by clause. Powered by a real SQL parser (node-sql-parser), not regex guesses.
🔗 Live: https://sql-plain.builtbyzero.com (deploys via Cloudflare Pages / Vercel)
- Paste SQL → instant breakdown
- Supports
SELECT,INSERT,UPDATE,DELETE,CREATE TABLE - Syntax-highlighted editor (CodeMirror)
- Copy explanation to clipboard (Markdown)
- 3 starter examples
- Mobile responsive, dark mode
- 🔥 Performance hints — SELECT * warnings, missing-index heuristics, leading-wildcard LIKE, ORDER BY without LIMIT
- 🌐 Dialect notes — MySQL vs PostgreSQL vs SQLite differences
- 📊 Complexity score — 0–10 rating with actionable advice
- 📤 Export — Markdown download + PDF print
Pro is currently stubbed; the upgrade button links to the builtbyzero product page. Stripe wiring coming soon.
git clone https://github.com/builtbyzero/sql-plain
cd sql-plain
npm install
npm run dev
# open http://localhost:3000npm run build
npm start- Next.js 14 (App Router)
- Tailwind CSS + custom theme (indigo→purple gradient)
- CodeMirror 6 for the SQL editor
- node-sql-parser for AST parsing
- Framer Motion for animations
- TypeScript end-to-end
lib/explain.ts walks the AST returned by node-sql-parser and produces a tree of ExplanationSections — one per SQL clause — plus a list of ProHints for the paid tier. The /api/explain route is a thin POST endpoint that runs the parser server-side (avoids shipping the parser to the client). The UI debounces input and re-renders with Framer Motion on each result.
MIT © builtbyzero
- cron-plain — explain cron expressions
- explain-regex — explain regex