Run SQL Queries on CSV Files Online
Upload one or more CSV files and query them with standard SQL syntax directly in your browser. Powered by SQLite (via sql.js), this tool lets you filter, join, aggregate, and transform CSV data without installing any software or uploading files to a server.
Key Features
- Multi-file support – Upload several CSV files at once. Each file becomes a SQL table named after the file.
- Full SQLite syntax – Use SELECT, JOIN, WHERE, GROUP BY, ORDER BY, aggregate functions, and more.
- Smart editor – Monaco-powered SQL editor with syntax highlighting and autocomplete for table names, column names, and SQLite keywords.
- Header detection – Toggle whether the first row of each CSV is treated as column headers or data.
- Download results – Export query results as a CSV file with one click.
How to Use
- Upload CSV files – Click the upload area and select one or more .csv files from your computer.
- Review your schema – After upload, you will see table names and column names displayed above the editor.
- Write a SQL query – Use the editor to write your query. Autocomplete helps with table and column names.
- Run the query – Click “Run Query” or press Ctrl+Enter (Cmd+Enter on Mac).
- Download results – Click “Download CSV” to save the query results.
Common Use Cases
- Filtering large datasets – Use WHERE clauses to find specific rows without opening a spreadsheet
- Joining related files – Combine data from multiple CSV files using SQL JOINs
- Aggregating data – Calculate sums, averages, counts, and other statistics with GROUP BY
- Deduplicating records – Use SELECT DISTINCT or GROUP BY to remove duplicate rows
- Quick data exploration – Browse and query CSV files without setting up a database
Privacy & Security
All processing happens entirely in your browser. Your CSV files are never sent to a server. The SQLite database runs in-memory using WebAssembly, and all data is discarded when you close or refresh the page.
Frequently Asked Questions
What SQL dialect is supported?
This tool uses SQLite syntax. Most standard SQL queries work, including JOINs, subqueries, aggregate functions, and string operations.
Is there a file size limit?
There is no hard limit, but performance depends on your browser and device memory. Files with tens of thousands of rows work well.
Can I query multiple files together?
Yes. Each uploaded CSV becomes a separate table. You can JOIN them or use subqueries across tables.
How are table names determined?
Table names come from the CSV file names (without the .csv extension). Special characters are replaced with underscores.
Is my data sent to a server?
No. Everything runs locally in your browser using WebAssembly. Your data never leaves your device.
Related Tools
You might also find these tools useful:
- CSV Editor — Edit, sort, format, and clean CSV data online.
- Fake Data Generator — Generate realistic test data for your SQL queries.
- Diff Checker — Compare query results or data versions side by side.