Open Large CSV Files That Excel Can’t Handle
Excel stops at 1,048,576 rows. Learn how to view, filter, split, and analyze huge CSV files without losing data, using free tools on your own device.
Whenever you double-click a massive CSV file, Excel either freezes, chokes your computer’s memory for ten minutes, or pops up a vague warning that the file was “not loaded completely”. Worse is when Excel silently loads the first 1,048,576 rows and quietly drops the rest without making it obvious.
Files that large are usually database dumps, payment logs, e-commerce order histories, or server logs—and you still need a way to inspect, filter, or slice them.
In this guide, I’ll walk through why Excel caps out, how to accurately check how many records you actually have, and six reliable ways to work with huge CSV files on your own computer without losing data.
Why Excel can’t open it
An Excel worksheet holds at most 1,048,576 rows and 16,384 columns, and one cell can contain at most 32,767 characters. These limits are listed on Microsoft’s Excel specifications page. If your CSV has more rows than that, Excel loads the first million or so, warns you that the file wasn’t loaded completely, and leaves out the rest.
Don’t save over the original after that warning. The saved file only contains what Excel loaded, and the rows it left out are gone. Always work on a copy of a file this size.
Even below the limit, a large file can be slow or crash Excel. Memory is the usual cause, and it gets worse with many columns, formulas, or formatting. If the file opens but looks wrong, with everything in one column or broken rows, the problem isn’t size. See our guide on fixing comma and newline errors in CSV fields.
Check what you have first
Before you pick a method, find out the file size and how many records it has. Don’t count lines to get the number of records. If any field contains a line break, the line count is higher than the record count. A tool that understands CSV quoting gives the right answer. With DuckDB (covered below), one command does it:
duckdb -c "SELECT COUNT(*) FROM 'big.csv'"
Which method should you use?
| What you need | Best approach |
|---|---|
| A quick look at the data and its structure | A browser-based CSV viewer |
| Totals, filters, or pivot tables | Excel’s Data Model, or DuckDB |
| Smaller files you can share or edit | Split the file with a CSV-aware script |
| A subset in Excel | Filter first, then convert the smaller CSV |
| A job you repeat every week | A short script |
Method 1: Look at it in a browser viewer
If you only need to see what’s inside, you don’t have to load millions of rows into a spreadsheet. The CSV viewer opens the file in your browser and shows it in pages, with live search and multi-column sorting. You can check the header, the delimiter, and the structure in seconds, and decide what to do next.
The file is read on your own device, not uploaded. You can verify that yourself with the Network tab check in our guide on why you shouldn’t upload sensitive CSVs to cloud converters. A browser has limited memory, so a very large file may be slow or fail to load. If that happens, use one of the next methods.
Method 2: Load it into Excel’s Data Model
Excel can analyze more than a million rows without showing them in the grid, by loading the data into the Data Model through Power Query. Availability depends on your Excel version and platform, and you need enough memory (64-bit Excel is best).
- Go to Data > Get Data > From File > From Text/CSV and choose the file.
- Check the preview, set the delimiter and encoding if needed, and choose Transform Data.
- In Power Query, remove columns you don’t need and filter rows. Fewer columns means less memory.
- Choose Close & Load To…, select Only Create Connection, and tick Add this data to the Data Model.
- Go to Insert > PivotTable > From Data Model to summarize it.
You can sum, count, and filter the full dataset this way, but you can’t scroll through every row. Menu names vary a little between Excel versions.
Method 3: Split it into smaller files
Splitting gives you files you can open, edit, and share normally. Use a script that understands CSV quoting and repeats the header in every part. Cutting a file every N lines with a command like split is risky, because it can cut through a record when a quoted field contains a line break, and it doesn’t repeat the header.
This Python script splits a CSV into parts of 500,000 rows each. We tested it on a file with commas and line breaks inside quoted fields, and the parts held exactly the same records as the original:
import csv
def split_csv(path, rows_per_file=500_000):
with open(path, newline="", encoding="utf-8-sig") as src:
reader = csv.reader(src)
header = next(reader)
part, out, writer = 0, None, None
for i, row in enumerate(reader):
if i % rows_per_file == 0:
if out:
out.close()
part += 1
out = open(f"part-{part}.csv", "w", newline="", encoding="utf-8-sig")
writer = csv.writer(out)
writer.writerow(header)
writer.writerow(row)
if out:
out.close()
split_csv("big.csv")
The utf-8-sig encoding writes a byte-order mark, which helps Excel show accented characters correctly when you double-click a part. Check each part in the CSV viewer, and compare the total rows with the original.
Method 4: Query it with DuckDB
DuckDB is a free, open-source tool that runs on your own computer and can query a CSV file directly without importing it first. It is a good choice when you need counts, filters, or a smaller extract. It counts records, not lines, so a quoted field with a line break counts once. Install it, then run:
duckdb -c "SELECT COUNT(*) FROM 'big.csv'"
duckdb -c "COPY (SELECT * FROM 'big.csv' WHERE country = 'US') TO 'us-only.csv' (HEADER, DELIMITER ',')"
The second command writes only the matching rows to a new CSV, which is often small enough for Excel. Replace country with one of your own column names.
Method 5: Process it in chunks with pandas
If you already use Python, pandas can read a big file in pieces, so memory use stays small:
import pandas as pd
total = 0
for chunk in pd.read_csv("big.csv", chunksize=500_000, dtype=str, usecols=["order_id", "amount"]):
total += pd.to_numeric(chunk["amount"], errors="coerce").sum()
print(total)
Reading only the columns you need with usecols and keeping values as text with dtype=str makes this faster and avoids surprises like dropped leading zeros.
Mistakes to avoid
- Saving over the original after Excel warns that the file wasn’t loaded completely.
- Using a line count as a record count. Line breaks inside quoted fields make the two differ.
- Uploading a huge file to a cloud converter. Big exports often hold customer or financial data, and uploads of that size are slow anyway.
- Assuming the data is complete. Compare the final row count with the source, and check the last rows.
- Ignoring encoding. If accents look wrong, re-save as UTF-8 and import with Data > From Text/CSV.
After you shrink the file
Once you have a smaller file, the usual tools work again:
- CSV to Excel turns a part into a proper .xlsx workbook.
- CSV to JSON is there if the data is headed for an app or an API.
- CSV to PDF makes a read-only copy of a filtered table. Use it for small tables, because a PDF is not a format for millions of rows.
- Merge CSV files recombines edited parts, as long as the combined file will fit where you plan to open it.
These tools run in your browser, so your files are processed on your own device. If you are following along but do not have a large file ready, our free sample CSV files include a 1,000-row transactions set you can use to practice splitting, filtering, and converting.
A quick checklist
- Did I make a copy of the file before I opened it?
- Do I know how many records it has?
- Do I need to look, summarize, filter, or share?
- Did I pick a method that keeps the data on my own computer?
- Did I check the row count and the last rows of the result?
Frequently asked questions
Why does Excel say “File not loaded completely” when I open a CSV?
Your file has more rows than an Excel worksheet can hold, which is 1,048,576. Excel loads what fits and drops the rest. Don’t save over the original, because the missing rows won’t be in the saved file. Use a viewer, the Data Model, a split, or a query tool instead.
What is the maximum number of rows in Excel?
A worksheet holds 1,048,576 rows and 16,384 columns, and a single cell can contain up to 32,767 characters. These limits are the same in current Excel versions. Memory can make Excel slow or unstable well before you reach them, especially with many columns or formulas.
How can I open a CSV with more than a million rows?
Look at it in a browser-based CSV viewer, load it into Excel’s Data Model with Power Query, query it with a free tool like DuckDB, or split it into smaller files. The right choice depends on whether you need to inspect, summarize, filter, or share the data.
How do I split a large CSV without breaking rows?
Use a script that understands CSV quoting, such as Python’s csv module, and write the header into every part. Tools that cut a file every N lines can split a record in half when a quoted field contains a line break, which corrupts the data.
Is it safe to open a large CSV in an online viewer?
Only if the viewer processes the file in your browser and doesn’t upload it. Large files often hold customer or financial data, so check the Network tab in your browser’s developer tools while you open a test file, and avoid tools that send it to a server.