Huge CSV WASM parser Generator ← Back to viewer

Run SQL on your CSV — in your browser, with SQLite

Open a CSV in Huge CSV, click one button, and your file becomes a queryable database: SELECT, GROUP BY, JOIN, the lot. There is no upload and no server — the whole database is SQLite compiled to WebAssembly, running inside your browser tab, holding your rows in memory. This page explains how that works, and lets you query a real SQLite database right here.

sqlitewebassemblysqlcsvin-browser db

One click: CSV → queryable database

When you open a CSV in the viewer, a button appears in the toolbar — “run SQL queries directly on your CSV”. Click it and Huge CSV hands the open file to a Web Worker, streams every row into an in-memory SQLite table called data, and drops you into a query editor. The columns of your CSV become the columns of the table; each row becomes a row. From there you write ordinary SQL:

-- the kind of question a spreadsheet makes painful
SELECT region, SUM(quantity * unit_price) AS revenue
FROM data
GROUP BY region
ORDER BY revenue DESC;

No import wizard, no CREATE TABLE, no loading a copy into Postgres. And because it is all local, the file you query never leaves the tab — the same privacy guarantee as the viewer itself.

What is SQLite?

SQLite is the most widely deployed database engine in the world — it is inside your phone, your browser, your car, and most of the apps on your laptop. Unlike Postgres or MySQL, it is not a server you connect to; it is a library. There is no daemon, no port, no login. The entire engine is a single C file, and a database is a single file (or, as here, just a block of memory). You call functions, it runs SQL, you get rows back — in the same process. That “no server” design is exactly why it can run inside a web page.

What is WebAssembly?

WebAssembly (WASM) is a compact binary format that every modern browser compiles to real machine code. You take a program written in C, C++, Rust or Zig, compile it once to a .wasm file, and the browser runs it at near-native speed — sandboxed, with no access to the network or the page unless you grant it. The SQLite project ships an official WASM build: the same battle-tested C engine, compiled to a module the browser can load. We vendor that build (a ~845 KB .wasm plus its JavaScript glue) and nothing else — no database backend, no API.

A database with no server, entirely in memory

Put the two together and you get something that still surprises people: a fully featured SQL database running in a browser tab, with no server anywhere. We open the database in SQLite’s :memory: mode, so the whole thing lives in WebAssembly’s linear memory — the fastest option, with zero files written and nothing to clean up. Your rows are streamed in 1 MiB blocks straight from the file on disk into INSERT statements, batched in transactions, so even a gigabyte of CSV never has to sit in a giant JavaScript string. When you close the tab, the database simply evaporates.

Try it — this is a real SQLite database

Below is a live SQLite database, compiled to WebAssembly and running in this page. We created a small example CSV — a sales table — and have already ingested it for you, exactly the way the viewer ingests yours. Edit the SQL and run it. Then scroll down and add your own rows. Nothing here talks to a server; you can prove it by turning your Wi-Fi off and querying away.

-- the example CSV we ingested into the table "sales"
id,region,product,quantity,unit_price,sale_date
1,North,Widget,4,9.99,2026-01-03
2,South,Gadget,2,19.50,2026-01-05
3,East,Widget,7,9.99,2026-01-07
...12 rows total
Live SQLite · table sales Booting SQLite (WebAssembly)…
Engine
Runtime size
Last query
Memory in use
Rows in table
or press ⌘/Ctrl + Enter

Every number in the stat bar is measured live: the engine version comes from sqlite3_libversion(), the runtime size is the actual .wasm we fetched, the query time is wall-clock around db.exec(), and the memory figure is the size of WebAssembly’s linear memory — watch it grow as you insert rows.

How it scales to huge files

The in-memory database is capped by how much memory WebAssembly can address, so the viewer offers the SQLite button for files up to about 1 GB. Above that, loading every row into memory stops being a good idea — so instead the Export & split menu streams a SQLite-compatible .sql dump (a CREATE TABLE plus batched INSERTs) straight to disk, which you import into a native SQLite database with one command:

sqlite3 out.db < dump.sql

So the in-browser path gives you instant, zero-setup SQL on everyday files, and the streamed dump gives you the same data in a real on-disk database when the file is enormous. Either way, the conversion happens locally. See what to do with a huge CSV file for the step-by-step, and how we built the WebAssembly CSV parser for the engine that reads the bytes.

The short version

Huge CSV turns any CSV into a queryable SQL database in one click, with no server and nothing uploaded. It does this by running SQLite — the world’s most deployed database engine — compiled to WebAssembly, in an in-memory database inside your browser tab. Your rows stream in locally, you write real SQL against them, and it all keeps working with the network turned off. The live database above is the very same engine; query it, break it, add rows to it — it is yours, and it is private.

Open the viewer Generate a test file