Run DuckDB SQL online
DuckDB — the analytics-focused embedded database — running in your browser via DuckDB-WASM. Pick "DuckDB" in the engine selector; the ~8 MB WASM bundle loads once and is cached.
press RUN (or Ctrl+Enter) — everything executes in your browser, nothing is uploaded
Why DuckDB here
DuckDB's SQL dialect is closer to Postgres than SQLite's is, and it adds analyst conveniences:
QUALIFY for filtering window functions, SELECT * EXCLUDE (col),
GROUP BY ALL, first-class INTERVAL arithmetic, and strict types. If your
production target is Postgres or a warehouse, DuckDB validation catches things SQLite happily
allows — try selecting a non-grouped column with GROUP BY on each engine and compare.
Stricter by design
DuckDB errors are a feature: division by zero raises an error (SQLite returns NULL), type conversions fail loudly, and its binder reports the line and column of the offending token — this page parses those positions and shows them under the error. DuckDB error messages often include their own "did you mean" candidates, which are passed through verbatim.
Notes for heavy queries
Everything runs in a browser worker with a 256 MB memory cap and a 5-second budget; runaway queries are cut off rather than freezing your tab. DuckDB is currently browser-only on sqlai.dev — the agent-facing API verifies on SQLite and flags DuckDB/Postgres divergence via dialect notes instead.
FAQ
Does DuckDB-WASM need special browser features?
No cross-origin isolation is required — it uses a standard dedicated Web Worker. Any modern browser works; the WASM bundle streams from a CDN and is cached after first load.
Why does the first DuckDB run take a few seconds?
The engine is ~8 MB of compressed WebAssembly. It downloads once, then subsequent runs are instant.
Is DuckDB available in the sqlai.dev API?
Not yet — the DuckDB WASM build exceeds Cloudflare Worker size limits, so the API verifies on SQLite and flags dialect differences. DuckDB runs fully in this page.
Can I query Parquet or CSV files?
Not on this page — it is scoped to schema + seed-row verification. Use the official DuckDB shell (shell.duckdb.org) for file-based analysis.
Related: Run SQL online (SQLite) · Test SQL without a database · Do these two queries return the same thing?