You have a long document and a model with a token limit, and the two do not fit together. The document is too long to paste into one request, but the job still needs doing: the report still needs summarising, the transcript still needs reviewing. The answer is to stop treating the document as one paste: split it into chunks, each small enough to fit comfortably, and work through them one at a time.

This guide walks through that workflow using the free Token Counter on Ovatly. One point of honesty up front: the counter does not split anything. It measures. The splitting is your job, done in your own document, and the counter is the measuring instrument that tells you whether each piece you cut is small enough.

Contents

  • Quick answer
  • Why chunking works
  • Choosing split points that keep the text readable
  • How to split and check, step by step
  • Worked example: three counted texts and one small limit
  • How much margin to leave
  • Limitations worth knowing
  • Common mistakes
  • FAQs
  • Conclusion

Quick answer

Count the whole text first with the Token Counter so you know how far over the limit you are. Then split the document at paragraph boundaries into pieces, paste each piece into the counter, and check its token count before sending. Keep splitting, or move a boundary, until every chunk sits comfortably below the limit rather than exactly at it. The counter runs a real BPE tokenizer in your browser, so none of your text is uploaded while you measure.

Why chunking works

A token limit applies to a single request, not to a document. Nothing says a long document must travel in one piece; it only feels that way because copy and paste is a single gesture. Once you see the limit as a per-request budget, the long document becomes a queue of ordinary requests, each with the same instruction and a different slice of text.

Chunking also beats the alternative people reach for first: trimming. Cutting a document down until it fits throws away whatever was cut. Splitting keeps everything: every paragraph is sent eventually, just not all at once. Where the whole text matters, that completeness is the point.

Choosing split points that keep the text readable

Split where the text itself breaks. Paragraph boundaries are the first choice, because a paragraph is a complete unit of thought: a chunk made of whole paragraphs still reads sensibly on its own, and a model working on it sees coherent material rather than a fragment. If one paragraph alone is too long, go one level down and split at a sentence boundary. The counter helps here more than you might expect: alongside tokens it shows sentences and paragraphs, so you can see the structure of what you are measuring and confirm the paste contains the paragraphs you intended.

What to avoid is the arbitrary cut: the first however-many words, regardless of what they contain. A chunk that ends mid-sentence, or mid-argument, produces worse results and is miserable to reassemble afterwards. Natural boundaries also make your chunks self-describing: a chunk that starts at a heading or a new paragraph is easy to label and put back in order.

How to split and check, step by step

  1. Open the Token Counter and paste the whole text. Click Count tokens and note the total. That figure tells you roughly how many chunks you are dealing with.
  2. In your document, take the first portion up to a paragraph boundary that you judge to be safely under the limit. Paste that portion into the counter and count it.
  3. Adjust by evidence, not by feel. If the chunk is over, move the boundary back a paragraph or two. If it is far under, add the next paragraph and count again. Each check takes seconds.
  4. Repeat down the document until every chunk has been measured and fits. Keep the chunks in order and clearly labelled, so the replies can be combined in the same order.
  5. Send one chunk per request with the same instruction, and leave room in each request for the model's reply as well as your instruction text.

Worked example: three counted texts and one small limit

A miniature version of the workflow, using the counter's own exactly counted demonstration texts, shows the measuring logic. The greeting "Hello, world!" is 4 tokens. The pangram "The quick brown fox jumps over the lazy dog" is 9 tokens. The sentence "Prompt engineering is the practice of writing instructions for AI models." is 12 tokens.

Imagine a content limit of 20 tokens for one request. Sending all three texts together would be 25 tokens: over the limit. Splitting after the pangram gives a first chunk of 4 plus 9, which is 13 tokens, and a second chunk of 12 tokens. Both fit, both end at sentence boundaries, and nothing was deleted. Real documents scale the same way, with paragraphs instead of sentences and thousands instead of dozens, but the method is identical: count, split at a boundary, count each piece, adjust.

How much margin to leave

Aim below the limit, never at it, for three reasons the counter itself makes clear. First, a raw-text count is the content size: real chat APIs add a few tokens per message for role markers and structure, and that overhead is not in your count. Second, the count is exact for the GPT-4o family encoding and a close approximation for Claude, Gemini and other families, which split text differently; an approximate count needs slack. Third, the request has to hold more than the chunk: your instruction travels with it, and in a shared window the model's reply needs room too. A chunk at 95 percent of a limit is a failure waiting for a slightly different tokenizer. A chunk at 70 or 80 percent is a chunk that works.

Limitations worth knowing

Very long pastes are counted on your own device, and a full book can take a moment, another reason to count in pieces. The counter shows tokens, characters, words, sentences and paragraphs for the text you paste; it does not track which chunks you have already sent, so keep your own list. And chunking divides the text, not the thinking: a job that depends on the whole document at once, like spotting a contradiction between chapter one and chapter nine, needs a plan for combining chunk results, because no single request ever sees the full text.

Common mistakes

  • Splitting by word count. Limits are set in tokens, and code, rare words and non-English text run well ahead of their word count in tokens. Count the chunk itself.
  • Cutting mid-sentence. Fragments produce confused results and painful reassembly. Paragraphs first, sentences second, never mid-thought.
  • Filling each chunk to the limit. Formatting overhead, tokenizer differences and the reply all need room the raw count does not show.
  • Forgetting the instruction's own size. Your prompt travels with the chunk and spends part of the same budget.
  • Losing track of order. Unlabelled chunks come back as unlabelled replies. Number them as you cut them.

FAQs

Does the Token Counter split my text for me? No. The counter measures text; it does not cut it. You choose the split points in your own document, paste each candidate chunk into the counter, and use the count to confirm the chunk fits. That division of labour is deliberate: only you know where your document's natural breaks are.

Where are the best places to split a long text? At paragraph boundaries first, because paragraphs are complete units of thought. If a single paragraph is still too long, split it at a sentence boundary. Avoid cutting mid-sentence or mid-word, which produces fragments that are harder for a model to work with and harder for you to reassemble.

How far below the limit should each chunk be? Leave a real margin. A raw-text count excludes the few tokens per message that chat formatting adds, the count is an approximation for model families other than GPT-4o, and the window also has to hold your instructions and the model's reply. A chunk that only just fits on paper can still fail in practice.

Why not just split by word count or character count? Because limits are set in tokens, and tokens are not words. Rare words, code and non-English text take more tokens per word, so a chunk that looks safe by word count can be well over the token limit. Counting the actual chunk in tokens is the only reliable check.

Is my text uploaded when I count the chunks? No. The tokenizer runs in your browser and nothing leaves the page, so you can measure chunks of a private document without sending that document anywhere.

Conclusion

A long text and a token limit are only in conflict if the text has to travel in one piece. Count the whole with the Token Counter, split at paragraph boundaries, count every chunk before it goes, and leave an honest margin below the limit. The measuring is free, private and takes seconds per chunk, and it turns an impossible paste into a short queue of requests that each fit. For what those requests actually cost on each side, see the companion guide on input tokens vs output tokens. More guides like these live in the AI and Prompt Tools guides.