RAG Chunker & Overlap Visualizer
Visualize how your text will be split into chunks for retrieval-augmented generation (RAG) pipelines. Configure chunk size, overlap, and splitting strategy, then see boundaries and export chunks — all locally.
Tool interface
Visualization
Chunk boundary Overlap region
Chunks
Introduction
Retrieval-augmented generation (RAG) pipelines split documents into chunks before embedding and indexing. Poor chunking strategies lead to irrelevant retrievals, wasted tokens, or lost context. This tool lets you visualize and tune your chunking parameters before building your pipeline.
How it works
- Choose a splitting strategy (recursive, markdown, paragraph, sentence).
- Set chunk size and overlap in characters.
- The tool splits your text and renders chunk boundaries inline.
- Overlapping regions are highlighted so you can see context bridges.
- Export chunks as JSON for use in LangChain, LlamaIndex, or custom pipelines.
Strategies explained
- Recursive character: attempts to split by paragraphs, then sentences, then characters, respecting the chunk size limit. This is the default in LangChain's
RecursiveCharacterTextSplitter. - Markdown headers: splits on heading boundaries (H1–H6), preserving document structure. Ideal for technical docs.
- Paragraph: splits on double newlines. Simple but may create very large chunks if paragraphs are long.
- Sentence: splits on sentence-ending punctuation (., !, ?). Good for fine-grained retrieval but may fragment context.
Overlap
Overlap ensures that context at chunk boundaries is not lost. A 50–100 character overlap is common for most use cases. Too much overlap wastes embedding tokens; too little risks losing context.
Limitations
- Character-based chunking does not account for token counts (use a tokenizer for exact token limits).
- Semantic chunking (embedding-based) requires a model and is not supported here.
- Very large documents (>100,000 words) may take a moment to process.
Privacy
All processing happens in your browser using deterministic JavaScript. There is no upload, no account, no API key, and no remote model. Your text never leaves the page.
FAQ
What is chunk overlap?
Overlap is the number of characters shared between adjacent chunks. It ensures context is not lost at chunk boundaries.
Why do my RAG retrievals fail?
Common causes: chunks too large (lose semantic coherence), overlap too small (lose context), or splitting strategy breaks document structure (e.g., splitting mid-sentence).
How does markdown header splitting work?
The tool splits on H1–H6 boundaries, creating one chunk per section. If a section exceeds the chunk size, it falls back to recursive splitting within that section.
Related tools
References
- LangChain — Text Splitters
- LlamaIndex — Node Parsers