CSV Analysis

Query CSV files with SQL in your browser

Drop a CSV file into SQL for Files, inspect the generated table, and run analytical SQL locally with DuckDB-WASM.

Automatic table creation for CSV files

Advanced CSV options for delimiters, headers, skipped rows, null strings, and date formats

Local browser-side processing without uploading file contents

CSV export for full query results

How it works

  1. Open the editor and drop a .csv file into Add Data, or pick it from your device.
  2. DuckDB detects the delimiter, header row, and column types, and creates a table named after the file.
  3. Write SQL against the table, review or chart the results, and export the full result as CSV.

Example queries

Preview a CSV table

SELECT *
FROM sales
LIMIT 25;

Aggregate CSV rows

SELECT category, COUNT(*) AS rows, SUM(amount) AS revenue
FROM sales
GROUP BY category
ORDER BY revenue DESC;

Join two CSV files

SELECT o.order_id, c.customer_name, o.amount
FROM orders o
JOIN customers c ON o.customer_id = c.customer_id;

Frequently asked questions

Is my file uploaded anywhere?

No. SQL for Files reads the file in your browser and loads it into DuckDB-WASM running on your device. The app does not send file contents, SQL queries, or query results to a server.

What if my CSV uses semicolons or a regional number format?

Delimiters, headers, and types are detected automatically. If detection is wrong, the advanced add options let you set the delimiter, header row, skipped rows, quote and escape characters, null string, date or timestamp format, and decimal separator before the table is created.

How large can a CSV file be?

Browser memory is the main constraint. A practical working range is usually around 2 to 3 GB of data in memory, and files around 200 MB are typically the easiest place to start.