How to Run SQL on CSV, Excel and Parquet Files in Your Browser
You do not need a database or a tool like DBeaver to ask questions of a file. Add it, write SQL, get the answer.
Open SQL on Your Files and add one or more files: CSV, Excel, JSON or Parquet. Each file becomes a table, named after the file. You can rename it.
Write a query using those table names, for example SELECT city, COUNT(*) AS customers, AVG(amount) AS average FROM customers GROUP BY city ORDER BY customers DESC. Click Run query, or press Ctrl or Cmd and Enter.
To combine files, add both and use JOIN, for example SELECT o.id, c.name FROM orders o JOIN customers c ON o.customer_id = c.id. Column names with spaces need double quotes.
The result appears as a table. Download it as CSV, Excel, JSON or Parquet, or save it to use in another tool. Your original files are never changed.
It runs on DuckDB, a fast analytics database compiled to WebAssembly, so the work happens on your device and your files are not uploaded. The first query downloads the engine (about 30 MB), so it needs internet once. Very large files can use a lot of browser memory, so filter or split them first.
How to use the SQL on Your Files: step by step
- Open SQL on Your Files and add your files.
- Write a SELECT query with the table names.
- Run it and check the result.
- Download the result.
When to use the SQL on Your Files
- Filter and summarise a big CSV without Excel
- Join two files on a key
- Check a Parquet file without writing code
- Prepare a clean extract for a report
Tip: Use LIMIT 100 while you build a query on a large file, then remove it for the final run.