Split Text File
Split a large text, log or CSV file into smaller parts without cutting lines.
Runs in your browser. Nothing is uploaded.
Updated
How to use Split Text File
- Choose or drop the file.
- Choose lines per part, a maximum size or a number of parts, and whether to repeat the header.
- Download the parts one by one or as a ZIP.
Split Text File at a glance
Typical use: Split a 2-million-row CSV into parts Excel can open, each with the header row.
Runs in your browser; nothing is uploaded. Parts are exact byte copies, so encoding and line endings stay as they are.
When to split a file
- A CSV is too big for Excel (1,048,576 rows), Google Sheets or an import form with an upload limit.
- A log file is too large to open in an editor or attach to an e-mail.
- A list should be handed out in equal batches, for example 1,000 addresses each.
Three ways to split
- Lines per part: every part has the same number of lines, the last one what is left.
- Maximum size: as many whole lines as fit in, say, 10 MB. A single line longer than the limit goes into a part of its own.
- Number of parts: the file is divided into parts of about equal size, each ending at a line break (the same rule as
split -n l/N).
Split Text File example
orders.csv has a header and 250,000 rows. With 100,000 lines per part and “Repeat the first line” ticked, you get orders_part01.csv and orders_part02.csv with 100,000 rows each and orders_part03.csv with 50,000, each starting with the header, so every part opens as a normal CSV.
Prefer the terminal?
The same with split on Linux (on a Mac, gsplit from Homebrew’s coreutils):
split -l 100000 -d --additional-suffix=.csv 'orders.csv' orders_part-l splits by lines, -C 10M by size, -n l/4 into four parts; none of them cut a line except -C when a single line is longer than the size. split can’t repeat a CSV header in each part; the page can.
Frequently asked questions
Is the file uploaded?
No. The file is read and split in your browser; nothing is sent to our server.
Can a line be cut in half?
No. Every part ends at a line break. That also keeps multi-byte characters (é, 東) whole, because they never contain a line-break byte.
Are the encoding and line endings kept?
Yes. The parts are exact copies of byte ranges of the original, so UTF-8, Windows-1252 and others, and CRLF or LF line endings, stay as they were. UTF-16 files have to be converted to UTF-8 first.
What if a CSV field contains a line break?
A quoted field with a line break inside counts as two lines here, so a part could end in the middle of that row. If your CSV has such fields, use Filter CSV, which reads CSV properly, or split by size and check the edges.
How big can the file be?
Up to 500 MB, and up to 10,000 parts.