mygemsSay hi

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.