Quarry › Guides

How to open a huge CSV file on a Mac

Numbers gives up around 1 million rows and Excel at 1,048,576. These are the ways that work for bigger files.

Updated 2026-12-03 · Leia em português

Why Excel and Numbers fail

Spreadsheets load every cell into memory and have hard row limits: 1,048,576 rows in Excel, about 1,000,000 in Numbers. A 2 GB export from a database or an analytics tool easily has tens of millions of rows.

Peek at the file in Terminal

To see the first lines and count rows without opening anything:

head -n 5 export.csv
wc -l export.csv

Query it with SQL using DuckDB

DuckDB reads CSV files directly and is very fast. With Homebrew:

brew install duckdb
duckdb -c "SELECT country, count(*) FROM 'export.csv' GROUP BY 1 ORDER BY 2 DESC"

Great if you know SQL; you still need another tool to chart the result.

Open it in a native app

Quarry runs DuckDB inside a Mac app: drop the file on the window and it opens as a table, with a small distribution chart in every column header. Then:

Tip: convert big CSVs to Parquet

Parquet keeps column types and compresses well, so the next open is instant. In DuckDB: COPY (SELECT * FROM 'export.csv') TO 'export.parquet'. In Quarry, use Export → Parquet.

Do it in Quarry

Quarry is a native Mac app that gets, cleans, models and reports on your data, like Power BI Desktop. Free for 7 days.

More guides