RAG Chunk Visualizer

Paste a document, choose a chunk size and overlap, and see exactly how a text splitter would cut it up for embeddings and retrieval. Everything runs in your browser.

0
Total chunks
0
Avg tokens / chunk
0
Total tokens (with overlap)
$0.00
Embedding cost (example rate)

Cost estimate uses an example rate of $0.02 per 1M tokens (typical for small embedding models). Your provider's rate may differ.

Chunk boundaries in your text

Chunk (odd) Chunk (even) Overlap region (shared by two chunks)
Paste some text above to see it chunked.

Chunk details

Chunk #Est. tokensCharsPreview
Chunking tradeoffs, in short: small chunks (100-300 tokens) give precise retrieval hits but lose surrounding context, so answers can miss the bigger picture. Large chunks (500-1000+ tokens) preserve context but dilute embeddings and drag irrelevant text into the prompt, raising cost. Overlap (typically 10-20%) prevents facts from being cut in half at a boundary, at the price of storing and embedding duplicate tokens. Sentence and paragraph splitting respect natural meaning boundaries and usually retrieve better than fixed-size cuts, but produce uneven chunk sizes. There is no universal best setting: start around 300-500 tokens with 10-15% overlap, then evaluate retrieval quality on real questions from your own data and adjust.