Query CSV files with SQL online
Open a CSV export as a SQLite table, then use SQL to answer questions without setting up a database server.
From file to results in three steps
- Open your data. Choose Quick Upload, or use Import Wizard to review table names, columns and data types.
- Write a SQL query. Find the exact table and column names in Database Structure. Select Run or press Ctrl+Enter (Cmd+Enter on Mac).
- Export your work. Download the result as CSV or save the whole database as a .sqlite file.
Find repeated customer IDs
GROUP BY collects rows with the same ID. HAVING keeps groups that contain more than one row.
SELECT customer_id, COUNT(*) AS occurrences
FROM contacts
GROUP BY customer_id
HAVING COUNT(*) > 1
ORDER BY customer_id;These queries use the example table names. For your own files, substitute the names shown in Database Structure; Quick Upload can add a suffix to a table name.
Read the complete guide with expected results →CSV headers and data types
Use a header row and check detected numeric types before comparing or summing values. Keep identifiers with leading zeroes as text using the Import Wizard. A semicolon-delimited export may require checking the import settings.
Inspect imported values before doing calculations, especially dates and numbers. Quote identifiers with double quotes when needed.
Save the result or the database
Use the result toolbar to download CSV. To keep all imported tables, choose Download SQLite Database. SQLSheet analyzes data with SQLite; it does not generate MySQL or PostgreSQL INSERT scripts.
Your files stay in your browser
File parsing and SQL processing happen on your device. SQLSheet does not upload your file contents to a server. The website downloads code and assets, and uses Google Analytics and Vercel Analytics for usage measurement. We do not send file contents, filenames or SQL text to analytics.
The active database and query drafts are saved locally in this browser and restored when you return to the app. Examples add sample tables alongside your own data and open their SQL in new query tabs. Existing tables stay intact. Keep a downloaded SQLite backup: clearing site data, private browsing or storage limits can remove or prevent local saves. Saved queries, import templates and display settings are also stored in your browser.
Frequently asked questions
Is SQLSheet free? Do I need an account?
SQLSheet is free to use, with no account or installation required.
Which SQL dialect does it use?
SQLite, powered by SQL.js. Use SQLite syntax rather than database-specific MySQL, SQL Server or DuckDB functions.
Which files can I open?
Quick Upload supports CSV, XLSX, XLS and SQLite database files (.sqlite, .sqlite3 and .db). The Import Wizard supports CSV and Excel, including XLSM and XLSB.
Can I save my results?
Download query results as CSV, or download the whole SQLite database from the left panel.
How large can my file be?
Practical limits depend on browser memory and your device. Large imports may be slow or exhaust memory. Try a smaller extract first; SQLSheet is not a replacement for a database server.