RAG chunking visualizer

Paste or load a document, choose one of nine chunking methods, and set the chunk size and overlap. The page draws every chunk on your text, counts its tokens, shows how many tokens the overlap repeats, and runs a keyword search over the chunks so you can see whether a question still finds its answer.

  • Free
  • Nine methods
  • Runs in your browser
  • No account

How it works

Chunking runs in your browser with the same engine function the PromptFlowEngine tools use. Token sizes are counted with the o200k_base tokenizer.

Overlapping text is striped, so you can see exactly which sentences appear in two chunks. Text that falls outside every chunk, such as heading markers, is shown too, because it would not be embedded.

The retrieval check ranks the chunks for a question with BM25, a standard keyword ranking function. If the chunk holding the answer is not near the top, the chunking is hiding it.

A comparison table runs every method on the same text with default settings, so you can see chunk counts, average size, and repeated tokens side by side.

Worked example

The sample support handbook loaded in the tool (293 tokens), split four ways. These numbers were produced by the chunker when this page was built.

MethodSettingChunksAverage tokensTokens repeated by overlap
Fixed size (tokens)120 tokens, 24 overlap311551
Sliding window120 tokens, 24 overlap311963
Sentence600 characters3970
Markdown-aware600 characters5590

Limits

Questions

What chunk size should I use for RAG?

There is no single right size. Smaller chunks retrieve more precisely but can lose the surrounding context; larger chunks keep context but dilute the match and cost more tokens. Try two or three sizes on your own document here and check which one still retrieves the answer to a real question.

How much overlap do I need?

Overlap matters most with fixed-size methods, where a cut can fall in the middle of an idea. Methods that cut at sentence, paragraph, or heading boundaries need little or none. The page reports how many tokens the overlap repeats, which is what you pay to embed and store.

Which chunking methods are included?

Fixed size by characters, fixed size by tokens, sentence, paragraph, recursive, sliding window, Markdown-aware, code-aware, and a lexical-similarity method.

Is my document uploaded?

No. Files are read by your browser and chunked there. Nothing is sent to a server.

Privacy

This tool runs in your browser. The text, files and numbers you enter are not uploaded, logged or stored on a server, and no account is needed. The site counts that a tool was used, never what was entered. Privacy and security lists everything the site stores and sends.

Use it where you write prompts

The same engine runs in your editor and your browser, so you do not have to come back to this page.

Keep going