CSV Query Tool — Run SQL on CSV Files

Query CSV data with SQL using a clearer paste, upload, and sample workflow. The page explains typed columns, quick queries, result export, and how to move the same data into CSV to SQL.

CSV Input

How to Use CSV Query

  1. Paste CSV, upload a file, or load the sample dataset.
  2. Review inferred types and write a SQL query, or start with a quick query.
  3. Run the query, inspect the table, then copy or export CSV, JSON, or a SQL handoff.

Features

CSV Query: practical uses

Use CSV Query for SQL on CSV, query CSV online, CSV SQL tool, and filter CSV data searches. The updated text explains the workflow without hiding the editor behind an empty upload state.

Why it helps

Frequently Asked Questions

What SQL syntax is supported? +
The tool uses SQL.js, a WebAssembly build of SQLite. It supports SELECT, WHERE, GROUP BY, ORDER BY, LIMIT, OFFSET, JOINs, subqueries, and aggregates like COUNT, SUM, AVG, MIN, and MAX.
What is the table name for my CSV? +
Your CSV is loaded into a table called data. Column names come from the first row when the header-row option is on. If a column name has spaces, wrap it in double quotes, such as SELECT "first name" FROM data.
How large a file can I query? +
There is no explicit file-size limit in the page script. The practical limit is the browser memory available for parsing the CSV, loading SQL.js, and storing the in-memory table.
Is my data sent to a server? +
The CSV is loaded into SQL.js in your browser tab after the SQL.js WebAssembly file loads from a CDN. The tool does not set up a server-side database for your file.
Can I run multiple queries on the same file? +
Yes. Once a CSV is loaded, you can run multiple queries against the same in-memory table. The query history keeps your last 5 queries for quick re-use.