SQL on CSV
Load a CSV file and query it with real SQL, powered by DuckDB running as WebAssembly in your browser. No upload, no signup, no server.
What this tool does
Your CSV is read locally and exposed as a table named data. Write any SQL statement DuckDB supports and run it directly against that table — aggregations, joins against a second table you build with a CTE, window functions, date and string functions, all of it. This is not a restricted query builder: it is the same SQL dialect you would use against a local DuckDB database, just running entirely in your tab.
SELECT country, COUNT(*)
FROM data
GROUP BY country
ORDER BY COUNT(*) DESC;Results and export
The preview shows up to 1,000 rows so a large result never has to sit fully in the browser tab. Exporting re-runs your exact statement and streams the complete result straight out of DuckDB as a CSV file, using the same safe export path as every other CSV export on this site: a value that a spreadsheet would read as a formula is neutralized. Only a statement that returns rows (aSELECT-style query, including one built with a WITH clause) can be exported; a statement like CREATE TABLE or PRAGMA runs, but has nothing to export.
An expensive query is still your query
A query that scans a lot of data, or joins a table against itself, can take a while or use a lot of memory — the same as it would in any local SQL tool. Use Cancel if a query is taking longer than expected; it stops the query without closing the file.
Browser-local processing
Your file is registered with the local database engine and never uploaded. The engine only loads its own WebAssembly, worker and extension files from this site; see the privacy page for what is and is not verified about that.
Don't need to write SQL?
The CSV Viewer offers search, sort and filter with no SQL required, and the CSV Profiler and Data Quality Analyzer compute column statistics and flag potential problems automatically.
Large files
This tool warns you above roughly 100 MB, warns more strongly above roughly 500 MB, and declines to open a file above roughly 2 GB rather than risk crashing the tab.