UTILS.
100% in-browser

Query CSV with SQL

Load a CSV and run real SQL (SELECT, WHERE, GROUP BY, JOIN) over it — 100% in your browser.

Loads its engine on first use, so there's no offline download — but it still runs privately in your browser, nothing uploaded.

About this tool

This tool loads a CSV into a real in-memory SQLite database and lets you run genuine SQL against it — SELECT, WHERE, ORDER BY, GROUP BY, aggregates like SUM and COUNT, subqueries and self-joins all work exactly as they would in a database. It is powered by the official SQLite compiled to WebAssembly, so the query engine is the real thing, not a partial reimplementation.

Nothing is uploaded. The SQLite engine and your CSV never leave your device — the whole database lives in your browser tab's memory and disappears when you close it. That makes it a safe scratchpad for exploring exports, sales data, logs or any spreadsheet you would rather not paste into an online database. Because it uses the official eval-free SQLite build, it also runs under strict security policies where sql.js-style tools are blocked.

Column names are taken from the header row and sanitized into valid identifiers; every value is stored as text, so cast to numbers in your query when you need arithmetic (for example CAST(price AS REAL)). Results render as a table you can download as CSV.

Frequently asked questions

Is my CSV or my query uploaded anywhere?
No. The SQLite engine runs entirely inside your browser via WebAssembly and the database is held in memory only. Your CSV, your SQL and the results never leave your device and are gone when you close the tab.
What SQL and which file formats are supported?
Input is CSV (comma, semicolon, tab or pipe delimited). The engine is real SQLite, so standard SELECT queries — WHERE, ORDER BY, GROUP BY, HAVING, LIMIT, aggregates, subqueries and joins — are supported. Loading the CSV creates a fresh table, so it is not a lossy re-encode; it simply reads your values into a database.
Why are numeric comparisons behaving like text?
Every column is stored as TEXT so nothing is guessed or lost, which means SQLite sorts and compares them as strings. Cast in your query when you need real numbers — e.g. ORDER BY CAST(price AS REAL) DESC or WHERE CAST(qty AS INTEGER) > 100.
How are column and table names chosen?
Column names come from the header row (with the header checkbox on) and are sanitized to valid SQL identifiers, de-duplicating clashes; without a header they become col1, col2 and so on. The table name defaults to t and can be changed before you load the CSV.

More tools