Run Ad-Hoc SQL Queries on CSV Files Without Database Setup
When stakeholders ask 'how many California orders used a discount code?', the traditional workflow requires spinning up PostgreSQL, writing CREATE TABLE DDL, configuring COPY commands, and running pg_dump just to execute a simple SELECT. This 45-minute friction discourages exploratory analysis. DuckDB-Wasm registers your CSV as a virtual table in the browser, running entirely in a WebAssembly sandbox. Write standard SQL—SELECT, WHERE, JOIN, window functions (ROW_NUMBER, LAG, SUM OVER), CTEs—and get results in milliseconds. Schema inference handles type detection automatically. Browser Wasm modules use memory-mapped virtual files backed by IndexedDB, allowing datasets larger than available RAM.
Why This Matters
A growth analyst needed to validate UTM attribution across 2.3 million Shopify orders before a board meeting. Installing Postgres on a locked-down corporate laptop required a 3-day IT ticket. Excel Power Pivot crashed at the 1M row limit. Using this tool, they ran SELECT utm_campaign, SUM(revenue) FROM orders GROUP BY 1 in 1.8 seconds. No installation, no IT tickets, no Python environments. Just drag, drop, and query. The result changed the board narrative: two 'underperforming' campaigns were actually victims of attribution fragmentation.
Why Excel & Python Fail Here
The 45-minute setup tax kills exploratory analysis. For a one-off question, you shouldn't need: Docker install → Postgres container → createdb → CREATE TABLE → COPY FROM → query → DROP TABLE → container cleanup. Each step is a context switch that breaks analytical flow. Corporate laptops often block Docker and Homebrew. IT tickets take days. The answer should take seconds, not infrastructure provisioning.
| Criterion | Excel / Sheets | Python / Cloud | DataPrep (This Page) |
|---|---|---|---|
| Max Rows | ~150K (crashes) | RAM-limited | 1M+ via Wasm |
| Setup Time | Manual formulas | 30–60 min env setup | 0 seconds |
| Data Privacy | Local but fragile | Uploads to cloud | 100% in-browser |
| Cost | License fees | EC2 / SaaS $49+/mo | Free forever |
Step-by-Step Solution
We will use the SQL on CSV to execute this entirely in your browser.
- 1
Drag and drop your CSV file(s)
Upload one or more CSV files. Each is registered as a virtual table named after the file (e.g., 'orders.csv' → table 'orders'). Schema inference detects types: INTEGER, DOUBLE, VARCHAR, DATE, BOOLEAN.
- 2
Write and execute SQL
The SQL editor provides syntax highlighting, table/column autocomplete, and query history. Supports full DuckDB SQL: SELECT, JOIN, GROUP BY, HAVING, window functions, CTEs, UNNEST, and subqueries.
- 3
Export results or continue iterating
Results display in a sortable table. Export as CSV or copy to clipboard. Modify and re-run queries iteratively—the file stays loaded until you close the tab.
Privacy Guarantee: Zero Bytes Uploaded
All processing happens in your browser via WebAssembly. Your data never touches a server. Try it: disconnect your Wi-Fi right now—the tool will still work.
Common Errors & Fixes
| Error / Symptom | Root Cause | Fix |
|---|---|---|
Query returns 0 rows on a JOIN | Type mismatch: one CSV has 'customer_id' as VARCHAR ('00123'), the other as INTEGER (123) | Use explicit CAST: SELECT * FROM a JOIN b ON CAST(a.customer_id AS VARCHAR) = CAST(b.customer_id AS VARCHAR) |
Browser tab crashes on 5GB+ file | Exceeding 4GB Wasm linear memory limit | Split the file first using our CSV Splitter, or filter columns to reduce memory footprint |
Frequently Asked Questions
Is my data uploaded to any server?
What SQL dialect is supported?
Ready to clean your data?
100% local processing · Zero uploads · Blazing fast
Trusted by 2,400+ data teams · 18M+ rows processed monthly