Skip to main content

LARGE CSV · PRACTICAL GUIDE

How to Split a Large CSV File

If a sales export stalls Excel, you can open it a piece at a time. Start with the limit your next step imposes. For an importer that accepts 20,000 records per file, choose the row-count option and enter 20000.

Published:

Updated:

Related tool: Split by rows or size

The short answer: choose the method that matches the split

Use Excel for a small one-off file, Power Query when the same Excel steps will be repeated, and Maskedcsv when you want to split a CSV of up to 500 MB in your browser. Avoid copying and pasting large files by hand because rows are easy to miss or duplicate.

Try a CSV split

Switch methods to see how the same six-row sample CSV becomes different output files.

Split method

Before: orders.csv

6 data rows128 B

Order IDStoreAmount
A001London1200
A002Madrid800
A003London1500
A004Madrid600
A005London900
A006Madrid1100

After

Split into 3 files

orders_001.csv

2 data rows58 B

Order IDStoreAmount
A001London1200
A002Madrid800
orders_001.csv2 data rows58 B
Order IDStoreAmount
A001London1200
A002Madrid800
orders_002.csv

2 data rows58 B

Order IDStoreAmount
A003London1500
A004Madrid600
orders_002.csv2 data rows58 B
Order IDStoreAmount
A003London1500
A004Madrid600
orders_003.csv

2 data rows58 B

Order IDStoreAmount
A005London900
A006Madrid1100
orders_003.csv2 data rows58 B
Order IDStoreAmount
A005London900
A006Madrid1100

Why a large CSV may not open

CSV is plain text, but the program opening it still has limits. Excel cannot place more than 1,048,576 rows on one worksheet, and smaller files can still be slow when rows contain many or long cells or memory is limited.

  • The file has more rows than an Excel worksheet can hold.
  • The computer runs short of memory while loading the file.
  • The wrong delimiter or encoding makes the preview unreadable.
  • A simple comma or line split breaks quoted commas and line breaks inside cells.

Excel vs. Power Query vs. Python vs. Maskedcsv

Choose by file size, how often you repeat the task, and whether you can maintain code.

Four ways to split a large CSV
MethodBest forAdvantagesLimitations
ExcelA small, one-off fileFamiliar visual interfaceRow limit and manual errors
Power QueryReusable Excel importsRecorded steps can be refreshedMultiple CSV exports need extra setup
PythonLarge or recurring jobsEasy to automateOngoing setup and upkeep
MaskedcsvQuickly splitting up to 500 MBWorks in the browserUp to 100 outputs; one column in value mode
  • Excel

    Best for
    A small, one-off file
    Advantages
    Familiar visual interface
    Limitations
    Row limit and manual errors
  • Power Query

    Best for
    Reusable Excel imports
    Advantages
    Recorded steps can be refreshed
    Limitations
    Multiple CSV exports need extra setup
  • Python

    Best for
    Large or recurring jobs
    Advantages
    Easy to automate
    Limitations
    Ongoing setup and upkeep
  • Maskedcsv

    Best for
    Quickly splitting up to 500 MB
    Advantages
    Works in the browser
    Limitations
    Up to 100 outputs; one column in value mode

Split the export and check the last file

If the preview columns do not line up, correct the delimiter or encoding before continuing.

For a 52,400-record export, the ZIP should contain three data files with 20,000, 20,000 and 12,400 records. Each has its own header. Add the data counts from the report before you hand the files over.

  1. Open CSV Split for row or size chunks, or Split by value for column groups, then choose one CSV.
  2. Check the header, encoding, delimiter, and preview.
  3. Enter the data rows per file or target size. On the value page, choose one column.
  4. Run the split, check the counts, and download the ZIP.
Split by rows or size

How splitting by a column value works

Value mode creates one CSV for each value in a selected column. For example, a Store column containing London, Madrid, and Seoul produces three files.

  • Rows with the same value stay in the same output file.
  • Blank values can be excluded or written to a dedicated output.
  • You can select one column and create up to 100 outputs per run.
Split by value

Row-count and file-size cautions

Maskedcsv accepts one CSV up to 500 MB. It can produce up to 100 CSVs with a combined size of 512 MB before they are added to the ZIP. Repeated headers and a change of encoding can make the output larger than the input.

  • Row-count mode excludes the header from the number of data rows per file.
  • In target-size mode, choose 0.1 to 50 MB per file. The target includes its header and any BOM. A single record larger than the target gets its own file.
  • Keep the original file and check the row counts before using the outputs.

Character encoding and garbled text

UTF-8 is common, while older Windows files may use Windows-1252. Choose the source encoding, check the preview, and use UTF-8 with BOM when the destination Excel setup recognizes it more reliably.

  • Check names, punctuation, currency symbols, and accented letters.
  • Shifted columns usually mean the delimiter is wrong.
  • If the source encoding is unknown, check the export settings of the system that created the file.