# SQL on your data — query a CSV with DuckDB, no upload

> Query CSV and other tables with SQL — SELECT, GROUP BY, JOIN — powered by DuckDB-wasm entirely in your browser. Export results. No upload.

Query dropped CSV and other tables with real SQL — SELECT, GROUP BY, JOIN — powered by DuckDB compiled to WebAssembly. It runs entirely in your browser, so your tables aren't uploaded.

SQL is the fastest way to answer a real question of a CSV — top customers, monthly totals, a join across two exports — but spinning up a database for a one-off is overkill. DuckDB in the browser gives you a genuine analytical engine against your local files.

Because it's the real DuckDB, complex queries with joins and window functions just work. Profile the data first with the Data profiler, join files with Join tables, or clean it with the PII scrubber.

## How to

1. **Add tables.** Drop one or more CSV/JSON files to query as tables.
2. **Write SQL.** Use standard SELECT, WHERE, GROUP BY, and JOIN.
3. **Run.** DuckDB-wasm executes the query on your device.
4. **Export.** Download the query results as a file.

## FAQ

### Do I need a database to run SQL on a CSV?

No. DuckDB runs in the browser and treats your dropped files as tables, so you get full analytical SQL without installing or connecting to anything.

### What SQL is supported?

DuckDB's analytical dialect — joins, aggregations, window functions, CTEs — so most reporting queries work as they would on a real warehouse.

### Is my data uploaded to query it?

No. DuckDB-wasm loads lazily and runs on your device, so the tables and results never leave the browser.


## Related tools

- [Join tables](https://www.safepaper.app/data/join)
- [Schema profile](https://www.safepaper.app/data/profile)
- [Filter rows](https://www.safepaper.app/data/filter)
- [Quick charts](https://www.safepaper.app/data/charts)

---

Canonical HTML: https://www.safepaper.app/data/sql-query
Markdown: https://www.safepaper.app/data/sql-query.md

There is no upload endpoint — your files are processed in this browser tab. Open your network tab and check.
