Run SQL SELECT queries against an uploaded CSV in the browser.
CSV Query as SQL loads a CSV into an in-memory table and lets you query it with a SELECT statement. Paste or upload a file, name the table, run the query and export the result as CSV or JSON. It is a quick way to filter, sort and summarise a spreadsheet export without a database.
A CSV file is plain text where each line is a row and commas separate the fields; the first line usually holds column names. SQL is the standard language for asking questions of tables, such as which rows match a condition, how to sort them or how to group and total them. Querying a CSV with SQL means treating the file as a table: the header gives the column names and each line becomes a row. This tool parses the CSV in the page, converting numeric-looking values to numbers, and exposes the rows as a table you name. Queries run with AlaSQL, a JavaScript SQL engine that is similar to common SQL but not identical to SQLite or PostgreSQL. To keep it safe, only a single SELECT or WITH query is accepted, and function names must be on an allowlist.
No. The file is read and queried in your browser with AlaSQL; the data stays in the page and is not sent anywhere.
AlaSQL, a JavaScript SQL engine. It handles common SELECT features such as WHERE, GROUP BY, ORDER BY, joins and WITH, but some behaviour differs from SQLite or PostgreSQL. Test unusual syntax on a small sample.
For safety the tool accepts only an allowlist of function names. Unknown names are rejected instead of being resolved as JavaScript, which is also why words like INTO, EVAL or CREATE are blocked.
No. Each run exposes one table built from the CSV in the box, so you cannot join to a second file.
Values that look like numbers become numbers and true or false become booleans; everything else stays text, including dates. Compare dates as ISO strings or use the date helpers.
5 MB of CSV text, 100,000 data rows, and 1,000 displayed result rows. Exports contain all result rows, up to 100,000.