RAG Chunk Overlap Visualizer

Paste text and choose a chunk size and overlap. Inspect repeated prefixes and estimate extra embedding volume using your own token and price assumptions.

Run a local check in your browser. No account or upload to a server is needed.

How it works

This is an explicit fixed-window splitter, not a recreation of a recursive or semantic splitter. Word mode uses non-whitespace sequences and normalizes spacing in the preview. Character mode counts Unicode code points, including whitespace; a visual character can contain more than one code point.

stride = size − overlap chunks = 0 for empty text; otherwise 1 + ceil(max(0, units − size) / stride) processed units = units + (chunks − 1) × overlap

Processing stops once a chunk reaches the end. Estimated tokens equal processed units times your token-per-unit assumption. Cost equals estimated tokens times your price per million divided by one million. The English preset uses the OpenAI approximation of 0.25 tokens per character or 4/3 tokens per word. It is not exact and is not intended for other languages. Custom ratios stay unchanged when units change; the price is an editable example. Arithmetic stays unrounded; displayed ratios use up to three decimals and percentages two. Local caps are 1 MB, 256 chunks and 200,000 processed units.

Worked examples

Ten words with one word of overlap

With 10 words, size 4 and overlap 1, the windows are 1–4, 4–7 and 7–10. That is 3 chunks, 12 processed words, 2 repeated words and 20% extra volume. At the example assumptions of one token per word and $1 per million, cost is $0.000012.

The same words without overlap

Size 4 and overlap 0 produce 3 chunks and 10 processed words. Repeated volume is zero and inflation is 1×.

Frequently asked questions

Are these actual model tokens?
No. Boundaries use words or Unicode code points. The token total is an estimate from your chosen ratio. Use the embedding model’s tokenizer for exact billing.
What overlap percentage should I use?
There is no universal choice in this tool. Compare visible boundaries, then test retrieval quality on your own queries. More overlap increases repeated volume without guaranteeing better retrieval.
Why can overlap increase chunk count?
Each next chunk starts size minus overlap units after the previous start. A smaller stride can require more chunks to cover the document.
Can I use this for Chinese text?
Use character mode to inspect Unicode code-point windows. Word mode only splits on whitespace and is not language-aware.
Can I export the chunks?
Yes. Download the JSON result with start and end offsets, repeated prefixes, fresh text and counts. Offsets start at zero and ends are exclusive.

Sources

Last reviewed 2026-11-14. The method is written out above so you can check our math.