To query a CSV file with SQL in the browser, open Zro7 SQL Playground, drop the file, and run SELECT * FROM my_file LIMIT 100. It's powered by DuckDB-WASM — a full analytical SQL engine compiled to WebAssembly — so you get real joins, GROUP BY, window functions, and CTEs on multi-gigabyte CSVs without installing anything or sending data to a server.
Why DuckDB-WASM changes the game
- Columnar execution — DuckDB reads only the columns your query touches, so a SELECT on 2 columns of a 200-column CSV is dramatically faster than
pandas.read_csv. - Vectorized — operates on batches of 1024+ values at a time, using WASM SIMD when available.
- Direct file registration —
duckdb.registerFileHandlestreams the CSV from your OPFS/File handle; no full-file copy into memory. - Same SQL as server DuckDB — anything you learn transfers to CLI DuckDB, dbt-duckdb, and MotherDuck.
Tutorial: analyze a sales CSV in 30 seconds
- Open SQL Playground.
- Drop
sales_2026.csv— Zro7 auto-registers it as tablesales_2026. - Run
SELECT country, SUM(amount) AS total FROM sales_2026 GROUP BY country ORDER BY total DESC;. - Add a chart with Local BI Dashboard if you want it visual.
Handy SQL patterns
- Sample the file:
SELECT * FROM sales USING SAMPLE 1%; - Cast a text column:
SELECT TRY_CAST(amount AS DOUBLE) FROM sales; - Time bucketing:
SELECT date_trunc('month', ts) AS m, COUNT(*) FROM events GROUP BY m; - Window rank:
SELECT *, ROW_NUMBER() OVER (PARTITION BY country ORDER BY amount DESC) rn FROM sales;
Zro7 vs cloud SQL playgrounds
Hosted options (BigQuery sandbox, Snowflake trials, Redash) all require uploading your CSV to their infrastructure. That's fine for public data, disastrous for anything with customer PII. DuckDB-WASM gives you the same expressive SQL locally, with no signup, no row limits, and no data leaving your laptop.
Zro7