Text file splitter
Split a large text file into smaller parts by lines per part, number of parts or a byte cap — with optional CSV header repetition and blank-line-aware breaks. Download each part or bundle them into a ZIP built locally with fflate; files never leave the browser.
Runs in your browserEvery computation happens in your browser — your data never leaves this device.
Pasted text is named after the file-name prefix; picked files keep their own base name. Multiple files are supported.
Plain text files such as .txt / .csv / .log / .md; up to 100 MB each and 20 files per run.
Split rules
Split result
Download each part separately, or bundle all parts into one ZIP.
Pick a file or paste text to see the split result
What this tool does
- Chop multi-million-line logs, CSV exports or database dumps into smaller files that open instantly
- Repeat the CSV header on every part so parts after the first one keep their column names
- Split long-line text by a byte cap to get roughly equal parts, then download each part or one ZIP
Example
Input
date,item,amount 2026-01-01,apple,3 2026-01-02,pear,5 2026-01-03,plum,8
Output
file lines bytes orders-01.csv 2 36 orders-02.csv 3 53
Example settings: 2 lines per part, "repeat first line" on, output extension csv, prefix orders. The lines column includes the repeated header line; bytes is the UTF-8 size of each part.
Frequently asked questions
Can it overwrite the original file on disk?
No. A web page cannot write to your local file system (the File System Access API exists only in Chromium and still asks for per-file permission), so the parts are delivered as downloads in the browser download folder, either one by one or as a single ZIP. For in-place splitting use the command line, for example split -l 10000 big.txt part- on Linux/macOS.
How large a file can it handle?
The UI caps a single file at 100 MB and 20 files per run. Splitting needs the whole text in memory (JS strings are UTF-16, so roughly twice the file size, plus an array of the individual lines). On this machine a 50 MB / 1,000,000-line text split at 10,000 lines per part took about 1.7 seconds with a peak heap near 1 GB. For bigger files, check the size with the "Large file line counter" tool first, or use the command-line split.
Are line endings changed?
Yes, they are normalised to LF: CRLF (Windows) and lone CR (classic Mac) both become LF, and every part ends with a single LF. The content of each line is untouched. If the target system requires CRLF, convert the parts afterwards in an editor.
Which line is repeated by "repeat the first line"?
The very first line of the source, and only when there is more than one part: part 1 stays as-is, and every later part gets that line prepended to keep a CSV header or title. The repeated line counts towards that part's "lines" value in the manifest.
How do the blank-line preference and the fixed part count interact?
Blank-line preference only applies to the line-count and byte-cap modes: after the limit is reached the planner looks back at most 5 lines and ends the part on a blank line when it finds one, so parts usually end at paragraph boundaries; beyond that window the plain limit wins. A fixed number of parts is a hard requirement, so that mode ignores the option.
Do the parts concatenate back to the original text?
The line sequence is preserved, but there are three intentional differences: line endings are normalised to LF, each part ends with one extra LF, and enabling header repetition adds extra header lines. So the output is not byte-identical to the source — keep that in mind when comparing checksums.
Keywords:split text filelarge file splittertxt incisezipfflate