RAG Chunker
Split documents into retrieval chunks by tokens, sentences or Markdown structure and inspect overlap
No semantic chunking: boundaries follow characters, tokens and text structure, not meaning.
JSON, JSONL and CSV use CodingTool fields (id, text, startChar, endChar, tokens, metadata); they are not a LangChain or LlamaIndex format.
Related Tools
How to use
- 1.Paste Markdown or plain text, import a .md or .txt file, or load an example.
- 2.Choose a strategy and set the chunk size and overlap in characters or tokens.
- 3.For token sizes, pick o200k_base or cl100k_base; counts are exact.
- 4.Review the statistics and the chunk cards; highlighted text is shared with the neighbouring chunk.
- 5.Under Advanced, edit recursive separators, set a minimum chunk size or keep the heading path.
- 6.Copy or download the chunks as plain text, Markdown, JSON, JSONL or CSV.
What is RAG Chunker?
RAG Chunker shows how a document will be split before you index it for retrieval-augmented generation (RAG) or embeddings. Choose fixed character or token windows, sentence, paragraph, recursive separator or Markdown-aware chunking, and see every chunk with its character range, exact token count, overlap with its neighbours and heading path. Statistics show the chunk count, total, average and median tokens, the smallest and largest chunk, and how much text overlap duplicates.
Accuracy and limits
Every chunk is an exact slice of your document, so its character range always points back to the original text. Token sizes and overlap are measured with the selected exact tokenizer, never estimated from characters; the Claude, Gemini and generic entries are estimates and are only offered for character sizes. A single block, word or token larger than the chunk size becomes its own chunk and is marked as over size. The tool does not do semantic or embedding-based chunking, ATX headings (lines starting with #) are recognised but underlined headings are not, and exports use CodingTool fields rather than a LangChain or LlamaIndex schema. Documents up to 5 MB are processed locally in a background worker.
Frequently asked questions
- Is my document uploaded?
- No. The document is chunked and tokenized in a Web Worker in your browser. It is never uploaded, logged or stored; only your chunking preferences such as strategy and size are remembered on this device.
- How accurate are the token counts and overlap?
- With o200k_base or cl100k_base the counts are exact: each chunk is tokenized on its own, and overlap is counted from the shared text with the same tokenizer, never estimated from characters. Claude, Gemini and generic entries are labelled estimates and can only be used with character sizes.
- Which chunk size and overlap should I use?
- Start with 256 to 512 tokens and an overlap of about 10 to 15 percent, then compare strategies on a real document. Smaller chunks give more precise matches but less context; the duplication overhead statistic shows how much extra text the overlap adds to your index.
