All posts

How to Split a CSV Into Files Under an Import Size Limit

··3 min read

To split a CSV under a size limit, fill one file at a time with whole rows until the next row would pass the limit, and repeat the header at the top of each file. The split CSV by file size tool does it in your browser. You type the largest size the import accepts, optionally a row limit, and it gives you the files with the exact size of each.

Do not trust a spreadsheet's file size for this. It is counting something different.

Why imports have a size limit

Sending tools, CRMs and upload forms cap each file, and a large export hits the cap. The fix is more files, not a smaller list. Splitting by hand is where mistakes happen: a row cut in half, a missing header, or a file just over the limit.

Step 1: do it by hand

Open the file in a text editor, copy the header, and cut the rows into parts, pasting the header into each. Check each part's size in your file manager. It is hard to get close to the limit this way, so people leave a wide margin and end up with more files than they need. In Excel, saving a part as CSV may also add a byte order mark or change line endings, which changes the size.

Step 2: use the splitter

  1. Upload the CSV or .xlsx, or paste the cells with the header row first.
  2. Type the largest file size the import accepts and choose the unit.
  3. Optionally add a limit on rows per file.
  4. Download each file, or all of them at once.

A file closes when it reaches either limit, the size or the row count. A row is never split between two files, and quoted cells with commas or line breaks stay whole.

How the size is counted

The size is the number of bytes of the plain CSV the tool writes: UTF-8 text with the header row, a comma between cells and a carriage return and line feed after every row, the line ending that RFC 4180 describes. Here 1 MB is 1,048,576 bytes and 1 KB is 1,024.

Another program may count a megabyte as 1,000,000 bytes, measure the file before it is compressed, or add a byte order mark. Set the limit a little under the real one. A workbook (.xlsx) file is a different format and its size does not map to the CSV size at all.

Rows or size

If an import limits rows and not size, use the email list splitter, or set the row limit here with a very large size. To take one slice of a file by row number, use the CSV row range extractor. To split by what a column holds, see how to split a CSV by column value. If the import rejects rows rather than files, see how to fix broken CSV rows.

What this cannot do

  • A single row larger than the limit still ends up in a file over the limit.
  • It counts a plain UTF-8 CSV. Other formats and encodings differ in size.
  • It cannot know a site's real limit.
  • Only the first sheet of a workbook is read.

Verify the list before you import it

Splitting makes the file fit, not the addresses good. Upload the list on the verify page: the first 100 email checks are free with a Google sign-in, no card. Each address comes back valid, risky or invalid with a reason, and nothing is sent to anyone on the list. For larger or recurring lists, see bulk email verification, list cleaning and pricing.

Split your file now

Upload it to split CSV by file size.

Common questions

How do I split a CSV into files under a size limit?

Fill one file after another until the next row would pass the limit, repeat the header in each file and never cut a row. A browser tool does this for you and shows each file's size.

How many bytes is a megabyte?

It depends on who is counting. 1 MB is 1,000,000 bytes in the decimal sense and 1,048,576 bytes (1 MiB) in the binary sense. Leave room under the limit you were given.

Does every file need a header row?

For each file to import on its own, yes.

What if one row is bigger than the limit?

It goes alone in its own file, which is then over the limit. Shorten the cells in that row.

What if the import limits rows, not size?

Split by row count instead, and give a very large size so the row limit is the one that applies.

Check your list before you send

Real mailbox checks over SMTP, and nothing is sent to the address. Sign in with Google and your first 100 email checks are free, no card. Plans for bigger lists are on the pricing page.