Free tool · runs in your browser
RAG text chunker
Split a document into chunks for retrieval-augmented generation, with the chunk size and overlap you choose, and preview every chunk.
Quick answer
For RAG, documents are split into chunks that are embedded and stored for vector search. Chunks of roughly 200 to 800 tokens with 10 to 20% overlap are a common starting point. This tool splits along paragraphs and sentences so chunks do not cut thoughts in half, and repeats the end of each chunk at the start of the next as overlap.
How to use it
- Paste your document. Plain text or Markdown.
- Set chunk size and overlap. In estimated tokens (about 4 characters each).
- Review and copy. Preview each chunk with its size, then copy them all as JSON.
Frequently asked questions
What is the best chunk size for RAG?
There is no single best size. 200 to 800 tokens is a common start; smaller chunks give precise matches, larger ones keep more context. Test on your own questions.
Why use overlap between chunks?
So a sentence or idea at the edge of one chunk also appears in the next, and is not lost when only one of them is retrieved.
Should chunks follow paragraphs?
Yes, where possible. Splitting on paragraph and sentence boundaries keeps each chunk readable and meaningful.
Do I always need RAG?
No. If your documents fit in the model's context window, sending them directly, with prompt caching, is simpler and often more accurate.
Is my document uploaded?
No. Chunking runs in your browser.
What is RAG?
Retrieval-augmented generation: for each question, find the most relevant passages in your documents and give them to the model, so its answer is grounded in your data.
What are embeddings?
Lists of numbers that represent the meaning of a text. Similar texts get similar numbers, which is how vector search finds the relevant chunks.
Should I add titles or metadata to each chunk?
Yes. Adding the document title, the section heading or the source to each chunk helps retrieval and lets answers cite where they came from.
How many chunks should I retrieve per question?
Often 3 to 10: enough to cover the answer without filling the prompt with unrelated text. Test on real questions.
Does chunk size affect cost?
Yes. Larger chunks and more retrieved chunks mean more input tokens on every question.