Run SQL on a CSV file
Real SQL, on your file, without installing a database.
- Real SQL, not a filter box
- GROUP BY, JOIN, window functions
- No database to install
- Nothing uploaded
CSV or TSV. Drag it here, or choose a file.
Why it exists
The usual advice for querying a CSV is to load it into a database first, which is three steps of setup before the first question gets asked. This runs an actual SQL engine — DuckDB, compiled to WebAssembly — inside the browser tab, so the file becomes a queryable table the moment you drop it in.
What it does
- Registers your file as a table named `csv` and lets you query it.
- Full DuckDB SQL: WHERE, GROUP BY, HAVING, ORDER BY, JOIN, CTEs, window functions.
- Column names and types are inferred and listed for you before you type.
- Errors come back from the engine verbatim, so a typo says what it is.
Why DuckDB
It is an analytical database that runs in a single process, and it compiles to WebAssembly — which means the same engine that would query the file on a server can query it in a tab instead. Your file is registered by reference and read as the query needs it.
Questions
- What SQL dialect is this?
- DuckDB's, which is close to PostgreSQL. Aggregates, joins, CTEs and window functions all work. Anything that writes to disk does not — there is no disk.
- What is my table called?
- `csv`. So `SELECT * FROM csv LIMIT 10` is always a valid first query. Column names come from your header row and are shown above the editor.
- Is the file sent to a server to be queried?
- No. The database engine is downloaded to your browser and the query runs there. The file is read from your disk and never leaves it.
The longer answer
This page does the job. The guide explains it — including the parts a tool cannot decide for you.
How to run SQL queries on a CSV file without a database (2026 guide)You do not need Postgres to run a GROUP BY. Here is how to query a CSV in place with DuckDB, SQLite, q or your phone — and which one fits which situation.The other tools
- Open a CSV file in your browserDrop a file in. It opens here, and it stays here.Open it
- Merge CSV files into oneSeveral files in, one file out, columns matched by name.Open it
- Remove duplicate rows from a CSVDuplicates on the columns you say identify a row.Open it
- Compare two CSV filesAdded, removed, changed — matched on a key, not line by line.Open it
- Convert a CSV to PDFA CSV, laid out as a readable table, saved as a PDF.Open it