Skip to content
utilnest

SQL query on CSV

Load one or more CSV files and query them with real SQL, joins and GROUP BY included.

  • Works in your browser
  • No sign-up
  • Free to use

How to use SQL query on CSV

  1. 1

    Add one or more CSV files. Each becomes a table named after its file, with number columns detected.

  2. 2

    Write a SQL query, for example SELECT city, SUM(total) FROM sales GROUP BY city.

  3. 3

    Press Run query (or Ctrl + Enter), check the results, and download them as CSV.

What this tool does

SQL query on CSV lets you answer questions about spreadsheet data with SQL instead of formulas. Load exports from your shop, bank, CRM or analytics tool, then filter, total, rank and join them in seconds.

Features

  • Real SQLite (via sql.js) running in your browser.
  • Several files at once, each as its own table, so joins work.
  • Automatic column types for whole numbers and decimals, so sums and sorting behave.
  • Results table with row count and timing, and a CSV download of up to 5,000 result rows.
  • Safe on slow queries: a query that runs over 20 seconds is stopped.

Limits

  • Data lives in memory, so very large files are limited by your device's memory.
  • Column names with spaces or punctuation need double quotes in SQL, like "Order Date".

Where your data is processed

This tool works in your browser: your files are loaded and queried on your own device, so they aren't sent to our server for this tool. Some other tools on UtiloNest do use our server, and their pages say so.

Frequently asked questions

Which SQL can I use?

SQLite's SQL, the same engine used by phones and browsers. SELECT with WHERE, ORDER BY, GROUP BY, HAVING, JOIN, subqueries, window functions and common functions like SUM, AVG, COUNT, ROUND, SUBSTR and DATE all work. You can also create views or temporary tables.

How are my files turned into tables?

Each file becomes a table named after it in lower case with underscores, so "Sales 2026.csv" becomes sales_2026. Columns keep their header names; columns that hold only whole numbers become INTEGER, decimals become REAL, and everything else is TEXT.

Can I join two CSV files?

Yes. Add both files and join them like any two tables, for example SELECT * FROM orders JOIN customers ON orders.customer_id = customers.id.

Do my changes save back to the CSV files?

No. The database lives in your browser's memory while the page is open. Your original files are never changed; download a query result to keep it.

Is my data uploaded?

No. SQLite runs in your browser as WebAssembly, so your files stay on your device.

Was this tool helpful?