LLM and Text, free, by Pivotal Labs

Split long text into chunks an AI model will actually accept

Paste a long document, pick a model, and get splits sized in tokens rather than characters, with overlap where the meaning runs across a boundary. It runs in your browser, so the document stays with you.

Loading Token Chunker...

What Token Chunker does

Paste long text, pick an AI model, get clean splits sized in tokens, with optional overlap. The chunks an AI model actually wants.

Doing this job well

Anyone who has tried to put a real document through a language model has met the context limit, and usually met it by having the answer quietly get worse rather than by getting an error. The fix is chunking, and chunking badly is why so many retrieval systems return confident nonsense.

The first thing to get right is the unit. Models count tokens, not characters or words, and the ratio is not stable: ordinary English runs about four characters to the token, but code, names, numbers and anything non-English run much shorter. Splitting on character count means some chunks are half the size they could be and others quietly overflow, and the overflow is the one you will not notice.

The second is overlap, which is the part most people skip. If a paragraph explains something in its first half and names it in its second, a hard split puts the explanation in one chunk and the name in another, and neither chunk answers the question. A small overlap means a fact that straddles a boundary still appears intact somewhere. It costs a little duplication and it prevents a whole class of confidently wrong answers.

The third is where to split, and this is judgement rather than arithmetic. Splitting mid-sentence is worse than splitting slightly early at a paragraph break, because the model reads a chunk as a passage rather than as a slice. Respecting the document's own structure beats hitting the size target exactly, more or less every time.

This is also the point in an AI project where cost and quality are actually decided, which is why it is worth doing deliberately rather than accepting a framework default. Chunk too small and you retrieve fragments without context. Chunk too large and you pay for tokens that were never relevant to the question, on every single call, forever.

It runs in your browser, which matters because the documents that need chunking are usually internal: contracts, policies, support histories, the knowledge base. Those are exactly the documents that should not be pasted into a free web service on the way to being pasted into a model.

Common questions

Is my document uploaded?

No. The chunking happens in your browser and nothing is sent anywhere, which matters because the documents worth chunking are usually internal.

Why size in tokens rather than words?

Because that is what models count, and the ratio varies. Code, names and numbers tokenise far shorter than prose, so a character based split is wrong in both directions.

How much overlap should I use?

Enough that a fact spanning a boundary survives intact in one chunk. A small overlap costs duplication and prevents a common class of wrong answer.

Does the model choice change the output?

Yes. Different models tokenise differently, so the same text produces different chunk boundaries depending on which one you are targeting.

Will it split in the middle of a sentence?

It prefers the document's own boundaries. Landing slightly under the target at a paragraph break reads better to a model than hitting the number exactly mid sentence.

Related applets

Built by Pivotal Labs

We build software, and this is a small piece of it.

Pivotal Labs is a software development and product management team. The applets on this site are the offcuts, the small things we build for ourselves and give away. The work we are paid for looks rather different.

See what Labs builds

When the browser tab is not enough

A one-off clean-up is a job for an applet. Doing it the same way every month, across systems that disagree with each other, is a job for digital transformation & ai adoption.