Preview character-based text chunks and overlap before designing a retrieval pipeline.
This is a local character-based preview, not a tokenizer or a production RAG pipeline. Text stays in your browser.
How chunk size and overlap work
Paste text or use the sample, then adjust the target size and overlap. The visualizer measures characters and tries to end chunks at whitespace or paragraph boundaries near the target size. Each later chunk starts before the previous chunk ends to repeat the configured overlap. This makes it easier to see how a split may preserve or divide a passage.
Choosing values for a RAG experiment
Smaller chunks can focus retrieval on a specific fact but may omit context needed to interpret it. Larger chunks preserve more surrounding material but can carry unrelated sentences into the prompt. Overlap can retain text near a boundary, while too much overlap duplicates content and can increase indexing and generation costs. There is no universal best size; evaluate several settings with real questions and judged source relevance.
Frequently asked questions
Are character counts the same as tokens?
No. Token counts depend on the tokenizer, language, and content. Use a provider-specific tokenizer when you need token-based limits.
Does this understand Markdown or code structure?
It only prefers paragraph and whitespace boundaries. It does not parse Markdown, syntax trees, tables, or document semantics.
Does the text leave my browser?
No. Chunking is performed in the browser, and this tool does not send the text to a DevsAgentic API.
How to interpret the preview
Each card shows the trimmed preview text, its measured character count, and offsets into the original input. Adjust the target size to see where a longer passage is split, then increase overlap to observe repeated text across neighboring chunks. The splitter prefers whitespace and paragraph boundaries when they are close to the target, but it cannot understand which sentences belong together or whether a table row needs its header. Inspect the results with your own documents rather than assuming the configured size is a strict semantic boundary.
A useful experiment is to choose a few questions your application should answer and inspect whether each resulting chunk contains enough context to support a response. Compare several sizes and overlap settings, then measure retrieval relevance and answer quality in an evaluation set. Character counts are only a convenient visualization: code, punctuation, and different languages tokenize differently. The Context Window Planner helps estimate how retrieved chunks fit into a broader model request. Do not paste confidential source material unless your local handling policy permits it.