Split text file
Split TXT by line count or a UTF-8 byte limit, then download the parts in one ZIP.
- 1Add input
- 2Adjust settings
- 3Get your result
Tool input and files are processed in this browser without being uploaded.
Before you start
Divide pasted text or a local TXT file into numbered UTF-8 files. Split by whole lines or by a byte limit; byte mode can divide a line but keeps each valid Unicode code point together. Download all the parts in one ZIP.
How to use this tool
- Paste text into “TXT”, or choose one local TXT file. A selected file supplies the text; remove it to use the pasted content instead.
- For a file, choose its encoding, read the local preview and confirm that the text is readable. Choose line count or UTF-8 byte mode under “Split by”, set the part size, then select “Split text”.
- Download split-text.zip and extract it. Review the numbered files inside it, starting with part-001.txt. Expand “Output details” for the number of parts and the decoded text’s UTF-8 byte count.
Supported inputs and limits
Pasted text can be up to 30 MiB in UTF-8; one local TXT file can be up to 10 MiB. A selected file supplies the source, even when pasted text is present. The pasted text is still checked against its own limit.
Use a whole-number part size from 1 to 31,457,280. The unit is lines or UTF-8 bytes, depending on the mode. Byte mode needs enough space for each complete code point; a part may be smaller than its byte limit. The ZIP can contain at most 1,000 parts.
File names can contain at most 512 UTF-16 units, including the extension; 😀 uses two units. Empty pasted text creates one empty part-001.txt, while an empty local file is rejected. Byte limits apply to the text in each part, not the ZIP headers.
Worked example
Example input
a b c
Example options
{
"mode": "lines",
"size": 2
}Example output
{
"parts": 2,
"inputBytes": 6
}When something does not work
If a run fails, the result is cleared. Check the input, encoding confirmation and whole-number part size; reduce the input or increase the size if it would need more than 1,000 parts. An invalid form entry, file-selection or preview error, or cancellation may leave a ZIP from an earlier run visible. Correct the issue and run again before using it. Keep the original source until you have reviewed the extracted parts.
Frequently asked questions
Are my files uploaded?
No. Splitting takes place in your browser. Keep the source and download the ZIP before refreshing or closing the tab. The temporary workspace in the same tab has size and time limits, so it may not retain a large result.
How do line and byte modes split the text?
Line mode groups whole lines and keeps their LF, CRLF or CR endings. A final line ending does not create an extra empty part. Byte mode measures each part’s UTF-8 text bytes; it may divide a line or separate CR from LF, but keeps each valid code point together.
Will joining the parts recreate the original file?
For valid Unicode text, concatenate the numbered parts without adding separators to recover the decoded text. The exported files are UTF-8. A leading BOM is removed when a local file is decoded, and GB18030/GBK or Big5 input is re-encoded; joining does not restore those original bytes or their BOM. Byte mode can separate combining marks or an emoji sequence, even though it keeps each code point together.
Documentation & further reading
Related tools
TXT to UTF-8
Read a TXT file with the right source encoding and save it as UTF-8.
Merge TXT files
Combine TXT files in your chosen order and save one UTF-8 text file.
Word counter
Words, characters, and paragraphs at a glance.
Case converter
Change pasted text to uppercase, lowercase or simple capitalized forms.