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.
| Method | Setting | Chunks | Average tokens | Tokens repeated by overlap |
|---|---|---|---|---|
| Fixed size (tokens) | 120 tokens, 24 overlap | 3 | 115 | 51 |
| Sliding window | 120 tokens, 24 overlap | 3 | 119 | 63 |
| Sentence | 600 characters | 3 | 97 | 0 |
| Markdown-aware | 600 characters | 5 | 59 | 0 |
Limits
- The retrieval check is keyword search (BM25). It shows whether the answer survives chunking; it does not predict the ranking of an embedding model.
- The “semantic” method groups sentences by shared words. Production semantic chunkers use embeddings, which this page does not call.
- Token sizes are exact for o200k_base. An embedding model with a different tokenizer will count somewhat differently.
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.
Chrome Extension
Optimize and improve prompts directly inside your browser, in ChatGPT, Claude, Gemini, Grok, Perplexity, and DeepSeek.
Load unpacked
VS Code Extension
Bring PromptFlowEngine prompt optimization directly into your development workflow.
VS Code Marketplace
Keep going
Lesson: Chunking
The idea behind this tool, with short videos.
Use the chunks in the RAG simulator
Video: chunk size and overlap
RAG Simulator
See how RAG finds an answer. Compare BM25 keyword search, TF-IDF vector similarity, and hybrid rank fusion on the same question, in your browser.
Context Budget Planner
Plan an LLM context window: enter tokens for instructions, tools, history, documents, and output, then see what fits each model and what it costs.