PasteZap
🌐 English
Free · No account

FREE · DEVELOPER TOOLS

SQL Query on CSV & JSON Files.

Run SQL queries on CSV, TSV and JSON files in your browser: each file becomes a table you can filter, group and join, then export the result.

Limits & supported formats

Up to 200 MB and 500,000 rows per file; results show up to 10,000 rows per query. Column types are detected automatically (INTEGER, REAL or TEXT). SQLite syntax.

Drop CSV, TSV or JSON files here or

Each file becomes a table you can query and join · up to 200 MB and 500,000 rows per file · nothing is uploaded

Column types are detected (INTEGER, REAL or TEXT); empty cells become NULL. Queries use SQLite syntax.

How to use SQL Query on CSV & JSON Files

Drop one or more CSV, TSV or JSON files (or try the sample data). Each file becomes a table; write a SQL query, press Ctrl+Enter and export the result as CSV or JSON.

How it works

Files are parsed with Papa Parse (CSV/TSV) or JSON.parse and loaded into an in-memory SQLite database (sql.js) in a background worker; tables can be joined and the whole database downloaded.

Example

With the sample orders.csv, SELECT country, SUM(quantity * unit_price) AS revenue FROM orders GROUP BY country ORDER BY revenue DESC ranks the countries by revenue.

Query CSV files with SQL

  1. Drop one or more CSV, TSV or JSON files, or press Try with sample data.
  2. Each file becomes a table named after the file (for example sales_2026); its columns and detected types appear on the left.
  3. Write a query such as SELECT country, SUM(quantity * unit_price) AS revenue FROM orders GROUP BY country and press Run query (Ctrl+Enter).
  4. Export the result as CSV or JSON, or download the whole database to reuse it in the SQLite Viewer.

With the sample orders.csv, that query ranks Germany first with 91.8 and France second with 83.4.

Types, joins and limits

Column types are detected from the values: whole numbers become INTEGER, decimals REAL and everything else TEXT; empty cells become NULL. Whole numbers longer than 15 digits, such as IDs or card numbers, stay TEXT so no digit is lost. Load several files to JOIN them on a shared column.

Each file can have up to 500,000 rows and 200 MB, and each result shows up to 10,000 rows. To edit cells by hand instead, use the CSV Viewer & Editor.

Questions about SQL Query on CSV & JSON Files

Are my files uploaded?

No. They are parsed in your browser and loaded into SQLite running as WebAssembly in a background worker.

Which SQL can I use?

SQLite syntax: SELECT, WHERE, GROUP BY, JOIN, window functions, CREATE TABLE AS and more.

Can I join two CSV files?

Yes. Add both files; each becomes a table, and you can JOIN them in one query.

Is SQL Query on CSV & JSON Files free, and do I need an account?

Yes. This tool is free to use in your browser without an account. Processing takes place on your device.

What are the limits and what should I check?

Up to 200 MB and 500,000 rows per file; results show up to 10,000 rows per query. Column types are detected automatically (INTEGER, REAL or TEXT). SQLite syntax. Review the result before using it in your work.

Is my input sent to a server?

Your input is processed in your browser and is not uploaded by this tool. Files and pasted text are cleared when the page is refreshed. Normal website requests are still required to load the page and its libraries. Read the privacy explanation.