Text File Splitter by Lines
Split pasted text or a UTF-8 file into chunks of existing lines. This page opens in Lines mode with 500 lines per chunk and zero overlap. Each line retains its original CRLF, LF or CR ending, and each chunk receives an ordered filename. Select a chunk to copy or save it as TXT. Line splitting does not wrap sentences or parse file structures.
The quick brown fox jumps over the lazy dog. Every chunk here ends on a character boundary, so n...
1 chunk of up to 500 lines, no overlap. The last one is 207 lines.
Whole existing lines, each keeping the ending it arrived with. Copy and Save work on chunk-01.txt, the chunk selected in the list.
- 13 chunks, the last is 120 characters
- 26 bytes in the first chunk, not 40: the emoji stays whole
- 13 chunks, each repeating the previous 200 characters
Up to 2,000,000 characters in one pass and up to 2,000 chunks, read and split here in your browser with nothing uploaded and no account. A delimiter may be typed with the usual escapes, so a blank line is \n\n and a tab is \t. The mode, the size, the overlap, the delimiter and the draft are kept in this browser alone, drafts up to 200,000 characters, and the Start over button above the tool forgets them.
Common questions
- Can I split a text file by lines?
- Choose Lines and enter how many existing lines belong in each chunk. Open a UTF-8 file or paste text. CRLF, LF and CR endings are kept with their lines; the selected chunk can be copied or saved. The line mode does not wrap a long sentence into new lines or understand quoted multiline CSV records.
- How do I split a text file into smaller files?
- Open the file with the Open file button or drop it on the panel, choose what to count, type a chunk size, and the pieces are listed in the chunks pane as you go. Each piece is a file in waiting: chunk-01.txt, chunk-02.txt and so on, numbered to the width of the count so they stay in order in any file list, and named after your file once you open one. Pick a piece in the list and Copy puts it on the clipboard or Save writes it out as a .txt file. There is no zip download, so the files come out one at a time, which is the trade for never uploading anything.
- Do the chunks really join back into the original?
- Yes, in all five modes when overlap is zero. Lines retain their original endings, words retain spacing and punctuation, and delimiters stay at the end of the pieces they close. Concatenate the chunk text directly, without adding separators. File import validates UTF-8 and preserves a leading BOM; it refuses malformed byte sequences instead of replacing them.
- How much text can it split at once?
- Up to 2,000,000 grapheme characters and 2,000 chunks in one pass. Larger requests are refused without truncation. Files must contain valid UTF-8 text; convert another encoding in a text editor first. Each saved file is UTF-8 text. Plain splitting does not guarantee that chunks of CSV, JSON, Markdown or subtitles are independently valid documents.
- Can I split a CSV or subtitle file this way?
- The tool reads it as plain UTF-8 text. It preserves existing lines but does not keep quoted multiline CSV records, repeated headers, subtitle cues or JSON objects intact. Chunks may need format-specific processing before another program can open them independently.
Splitting is exact and reversible: join the chunks back in order with the overlap off and you get the original text back character for character, in every mode. Where this tool picks the boundary, by characters, by bytes or by lines or by words, the cut falls on a Unicode grapheme cluster edge (UAX#29), so it never lands inside an emoji, a combining mark or a surrogate pair, and a chunk stops short of a byte budget rather than breaking a character; a cut at a delimiter falls exactly where you put it, and an overlap must be smaller than the chunk or it is refused. The text is read and split in your browser.