gizmobench

Text Splitter

Paste a transcript or open a text file and the chunks are on the first screen: your text on the left, the numbered pieces on the right, each one ready to copy or save. There are four ways to cut it, by characters as a reader counts them, by UTF-8 bytes, by whole lines, or at a delimiter you type, and an overlap can carry the end of one chunk into the start of the next. What is different here is what does not happen to your characters. In the three counted modes the boundary is picked on a grapheme cluster edge, so it never lands inside an emoji, a skin tone, a flag, a keycap or a combining accent, and byte mode stops a chunk short of its budget rather than cutting a character in half. A delimiter cut falls exactly where you put it. Lines keep the ending they arrived with and a delimiter stays at the end of the piece it closed, so with the overlap off the chunks join back into exactly the text you started with. The sample on the page is 48,120 characters and splits into 13 chunks of 4,000, the last one being 120. Nothing is uploaded and there is no account.

chunks13 files
  • The quick brown fox jumps over the lazy dog. Every chunk here ends on a character boundary, so n...

Chunks
13
Split by
Chunk size
chars
Overlap
chars
Last chunk
120 chars

13 chunks of up to 4,000 characters, no overlap. The last one is 120 characters.

Characters as a reader counts them: an emoji is one, an accented letter is one. Copy and Save work on chunk-01.txt, the chunk selected in the list.

  • 48,120 chars at 4,000 eachno overlap
    13 chunks, the last is 120 characters
  • Boundary lands mid-charactera 25-byte emoji at a 40-byte budget
    26 bytes in the first chunk, not 40: the emoji stays whole
  • Overlap 200 on 4,000carry-over
    13 chunks, each repeating the previous 200 characters
What a chunk boundary can and cannot land on. Wherever this tool picks the boundary, by characters, by bytes or by lines, it picks a grapheme cluster edge, the unit a reader calls a character, so the cut never falls inside an emoji, a skin tone, a flag, a keycap, a combining accent or a surrogate pair. In byte mode that means a chunk stops short of its budget rather than cutting a character: the sample this page opens with is 48,120 characters and 48,824 bytes as UTF-8, and the two numbers move apart exactly where the text stops being ASCII. A delimiter cut is yours to place, and it falls exactly where your delimiter does. Lines keep the ending they arrived with, and a delimiter stays at the end of the piece it closed, which is what lets the chunks add back up to the text they came from.

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.

Accuracy. 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, 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.

Common questions

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 on the right 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.
Will splitting break my emoji or accented characters?
No, and that is the reason this page exists. Cutting a string at a fixed number of code units puts a boundary inside a character: a family emoji is one character made of 7 code points and 25 UTF-8 bytes, and a naive cut hands you back two halves that both print as a question mark in a box. Every mode here works on Unicode grapheme clusters, the unit a reader calls a character, so an emoji, a skin tone, a flag, a keycap, a combining accent and a CRLF pair all travel whole. In byte mode a chunk simply stops short of its budget when the next character will not fit.
What is the overlap for?
It repeats the end of each chunk at the start of the next one, which is what you want when the chunks are going into something that reads them separately: a sentence cut in two is then readable in both pieces, and a retrieval index does not lose the join. On the sample here, 4,000 characters with an overlap of 200 gives 13 chunks, each one repeating the previous 200 characters. The overlap has to be smaller than the chunk, because an overlap as large as the chunk would never reach the end of the text, and the tool refuses it and says so rather than looping. With the overlap off, and only then, the chunks rejoin into the original.
Can I split by bytes instead of characters?
Yes. Byte mode counts the UTF-8 bytes a chunk encodes to, which is what matters when the limit comes from a field size, a protocol or an upload boundary. A chunk never exceeds the byte budget you set: it takes whole characters while they fit and stops, so a chunk can come back a few bytes short. If one single character needs more bytes than the whole chunk, a 25 byte family emoji in an 8 byte chunk for example, the tool says so and names the size to raise it to, rather than cutting the character up to make the number work.
Do the chunks really join back into the original?
Yes, in all four modes, as long as the overlap is off. Nothing is added between the pieces and nothing is dropped: lines carry the ending they arrived with, so a file that mixes CRLF and LF comes back mixed the same way, and a delimiter stays at the end of the piece it closed instead of being eaten by the split. That last part is deliberate. A splitter that removes your separator cannot put your document back together, and the reversible answer is worth more than a slightly tidier first line.
How do I split at a blank line or at my own marker?
Choose Delimiter and type the marker, for example three dashes for a screenplay or a chapter break. The field takes the usual escapes, so a blank line is \n\n, a tab is \t and a carriage return is \r, and a backslash followed by anything else is left exactly as you typed it. Pieces per chunk decides how many of the resulting pieces go into each file, so 1 gives one file per section and 5 groups five sections together. If the marker does not appear in the text at all, the page says so instead of quietly handing back one chunk.
How much text can it split at once?
Up to 2,000,000 characters in a single pass, and up to 2,000 chunks. Past either one the page splits nothing and says what to do: a text over the character limit is measured against it, and a chunk size that would make more than 2,000 pieces comes back with the size to raise it to. It never truncates, because a splitter that silently dropped the end of a transcript would be worse than one that refused it. A file you open is read as UTF-8 text in your browser, so the chunks always rejoin into exactly the text shown in the box.
Is my text uploaded anywhere?
No. The splitting happens in your own browser, which is the point when the text is a client call transcript or an unpublished manuscript. There is no account, no sign-up and no upload, and the page makes no network request of its own. Your draft is remembered on this device alone so it is still there when you come back, up to 200,000 characters of it, a longer paste still splits in full but is not stored, and the Start over button above the tool forgets the draft along with the mode, the size, the overlap and the delimiter.

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, 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.