>_QueryLocalCSV & JSON tools that run in your browser

How do I count the number of rows in a CSV file?

SELECT COUNT(*) AS row_count FROM data;

Run this query on the demo dataset →

COUNT(*) counts every row in the table, regardless of NULLs in any particular column. It's the quickest way to confirm how many records a CSV actually contains before you start filtering or aggregating — especially useful right after import to check nothing got dropped.

A table named data with columns: order_id (integer), customer (text), country (text), category (text), quantity (integer), unit_price (real), order_date (text, YYYY-MM-DD).

Want to run it on your own file? Open it with Count rows in a CSV: your file becomes the table data, and you can paste this query with your own column names.

Related recipes