Text File Splitter
Break a large text file into manageable pieces. Split every N lines, into a number of equal parts, by a maximum file size, or wherever a line matches a pattern such as a chapter heading or a date. Lines are never cut in half, header lines can be repeated in every part, the original encoding and line endings are kept, and all parts download together as a ZIP.
- Runs in your browser
- No sign-up
- Free to use
How to use Text File Splitter
- Drop a text, CSV or log file.
- Choose how to split it and check the plan.
- Set how many header lines to repeat.
- Split and download the parts or the ZIP.
Text File Splitter features
Four methods
Lines per file, equal parts, maximum size or marker lines.
Whole lines
Parts always end at a line break.
Header repeat
Copy CSV headers or other first lines into every part.
Faithful output
Keeps line endings and byte-order mark.
Preview plan
Shows how many files and lines before splitting.
Local
Up to 200 MB, processed in your browser.
When to use Text File Splitter
- Splitting a CSV export that is too large for a spreadsheet or importer.
- Cutting a huge log file into pieces an editor can open.
- Dividing a word list or address list into batches.
- Separating a long document into chapters at its headings.
Text File Splitter FAQ
Will lines be cut in the middle?
No. Every method splits between lines; a part may be slightly smaller than the size limit rather than breaking a line.
How do I keep the CSV header in every part?
Set “Repeat header lines” to 1. For CSV files it is set automatically. For more CSV-specific options, use the CSV Splitter.
What does split by marker do?
A new part starts at every line that matches the regular expression you give, for example ^Chapter or a timestamp pattern.
Are encodings preserved?
The text is decoded and written back as UTF-8 with the original line endings and byte-order mark. Windows-1252 files become UTF-8.
How many parts can I create?
Up to 500 at a time.
Is my file uploaded?
No. Splitting happens in your browser.
Splitting text files without breaking them
Large text files hit limits everywhere: spreadsheets stop at about a million rows, upload forms reject big files, editors slow to a crawl and import tools time out. Splitting the file into smaller pieces is the usual remedy, and the important part is to do it without damaging the content, which means never cutting a line and keeping any header the receiving program needs.
The splitter reads the whole file, detects its encoding and line endings, and splits it into lines. Four methods then decide where parts end. A fixed number of lines per file suits imports with row limits. A number of equal parts suits sharing work between people or processes. A maximum size suits upload limits, and grows each part line by line until the next line would exceed the size. Markers start a new part at lines matching a pattern.
Header lines can be repeated at the top of every part. For CSV files this is essential, because each part must still say what its columns are, so the setting is applied automatically when a CSV file is opened. For other files it can carry a title line or a comment into every piece.
Each part keeps the original line endings and byte-order mark, so the output behaves like the input in other programs. Parts are numbered with leading zeros, such as data-part-01.csv, so they sort correctly, and they can be downloaded one by one or together as a ZIP archive.
All of this happens in your browser, which keeps large or sensitive files on your device. The plan above the button shows the number of parts and lines before anything is created, so you can adjust the settings first.