AI Prompt Toolkit

RAG Chunk Simulator

All tools

See exactly how your document will be chunked before you pay to embed it.

How it works

Four simple steps

1

Paste a document

Add Markdown or plain text you plan to embed.

2

Choose a chunk strategy

Fixed size, headings, or recursive splits with overlap.

3

Inspect chunk sizes

Heatmap variance and orphan heading warnings.

4

Export JSONL

Download chunk IDs for your RAG pipeline.

RAG Chunk Simulator

About RAG Chunk Simulator

Your retrieval answers keep coming back half right, and you suspect the chunker is splitting definitions away from the paragraphs that use them. Re-indexing the whole corpus to test a new setting is slow and costs money. RAG Chunk Simulator shows the split on one document first.

Paste a Markdown or plain-text document and choose a strategy: recursive (paragraph first, then sentence), Markdown headings, or fixed size in characters. Set a target size between 40 and 20,000 characters and drag the overlap slider from 0 to 600 characters. The stats panel reports chunk count, mean, min, max, standard deviation and variance as a percentage of the mean. Each chunk gets a color-coded row showing characters, estimated tokens, words and the heading it sits under, and the first 60 are previewed on screen.

Warnings flag chunks that are almost entirely a heading, chunks that end on a heading, chunks under a quarter of the target and chunks over 125 percent of it. Overlap is a common trap: it also adds to chunk length, so a big overlap can push chunks past your target. For embedding cost, type the price per million tokens your provider charges and how many similar documents you have. The Embedding Estimator gives a quicker single-number check, and the Context Estimator helps when you are sizing how many retrieved chunks fit in a prompt.

The JSONL export includes an id, text, heading, character count, estimated tokens and start and end offsets for every chunk. Chunking and statistics are computed in your browser, so private handbooks stay on your machine.

Keyboard shortcut

Ctrl Enter - Run tool

Use cases

Tune before indexing

Compare strategies on a sample document before a full re-embed.

Catch bad boundaries

Find headings separated from the text they introduce.

Seed a pipeline

Export JSONL with offsets to test a loader or vector store.

FAQ

Frequently asked questions

See all FAQs

Answers for this tool. For site-wide help, open the FAQ hub.

For Markdown with real headings, try the heading strategy first, since the author already marked topic boundaries. For long unstructured prose, recursive splitting usually produces more even chunks. Fixed size is most useful as a baseline to compare the other two against.

It is the standard deviation of chunk sizes divided by the mean. A low figure means chunks are similar in length. A high one means some chunks are much denser than others, which tends to skew similarity scores.

No. Tokens are estimated as characters divided by four, which is close for English prose but undercounts code, JSON and many non-Latin scripts. Use the estimate for planning, not for reconciling an invoice.

View more FAQs

Related tools

View all

LLM Cost Estimator

Estimate multi-model API cost from tokens or pasted prompts.

Open

Chat Messages Studio

Build and convert OpenAI/Anthropic chat message JSON payloads locally.

Open

Prompt Eval Rubric

Score prompt variants against weighted rubrics before spending API credits.

Open

Prompt Generator

Generate AI prompts instantly.

Open

Explore 321 free tools

Everything you need as a developer, marketer or creator - in one beautiful place.

Browse all tools