> Source: https://meetrix.io/features/rag-chunking-visualizer/
> Markdown copy of that page. Cite the URL above, not this file.

# RAG Chunking Visualizer

See how your documents split into RAG chunks with recursive, fixed-size, sentence and Markdown splitters - free, online, no sign-up, and it runs entirely in your browser.

This RAG chunking visualizer shows exactly how a document splits into chunks before it is embedded, with each chunk colored and the overlap between chunks highlighted. It works as a RAG chunking visualiser for the four strategies most pipelines use, including a tested match for LangChain's RecursiveCharacterTextSplitter. It is free, and your documents never leave your browser.

Strategy Measure in Chunk size:   Overlap:  

Presets:    

Document

### Document view

chunks overlap

### Chunks

## Why use this RAG chunking visualizer

#### See the chunks, not just the count

Every chunk is painted over your document with overlap hatched, so a heading cut from its paragraph or a table split in half is obvious at a glance.

#### The same chunks LangChain makes

The recursive strategy is a port of RecursiveCharacterTextSplitter, tested against the Python library, so what you tune here is what your pipeline indexes.

#### Tune with numbers

Chunk count, size range, a size histogram and how many chunks end mid-sentence update as you drag the sliders.

#### Private by design

Internal docs, contracts and support tickets stay on your machine. Nothing is uploaded or downloaded to split them.

## How to visualize RAG chunking

1.  **Add a document.** Paste text, open a .txt, .md or code file, or start from the sample. For a PDF or Word file, copy its text and paste it in.
2.  **Pick a strategy.** Recursive character is what LangChain uses by default. Markdown headers keeps each chunk inside one section. Sentence packing never cuts a sentence. Fixed size shows what ignoring structure does.
3.  **Set chunk size and overlap.** Drag the sliders or pick a preset, in characters or estimated tokens. The view updates as you move them.
4.  **Read the result.** Each chunk gets its own color in the document, overlap is hatched, and the stats show chunk count, size range and how many chunks end mid-sentence.
5.  **Export the chunks.** Copy or download them as JSON or JSONL, with each chunk's start index, length and Markdown heading path, ready to embed.

## Common RAG chunking problems and fixes

-   **Chunks end in the middle of a sentence:** fixed-size splitting does this by design. Switch to recursive or sentence packing, or raise the chunk size so whole paragraphs fit. The "Ends mid-sentence" stat shows how often it happens.
-   **A chunk ends with the next section's heading:** recursive splitting often carries a heading into the chunk before its section, because the heading fits and the paragraph after it does not. The heading is then separated from the text it describes. Markdown header splitting fixes this by always starting a chunk at a heading.
-   **Lots of tiny chunks:** short lines, lists and tables give the recursive splitter many small pieces at each line break. A larger chunk size lets it merge them; for Markdown, header splitting keeps each list with its section.
-   **Text pasted from a PDF splits on every line:** PDFs put a line break at the end of each printed line, so the splitter sees hundreds of "paragraphs". Join single line breaks into spaces before chunking, keeping blank lines between paragraphs.
-   **Code blocks and tables are cut in half:** use Markdown header splitting with a chunk size larger than your biggest block, or a language-aware splitter such as LangChain's `RecursiveCharacterTextSplitter.from_language` for source code.
-   **Retrieval returns near-duplicate chunks:** overlap is too high. Bring it back to 10 to 20 percent of the chunk size, or deduplicate results before they reach the prompt.
-   **Chunks look right but answers are still wrong:** chunking is only half of retrieval. Prepend the heading path to each chunk before embedding, check that your embedding model's input limit is not truncating chunks, and test with the questions your users actually ask.

Check how many tokens a chunk really costs with the [LLM token counter](https://meetrix.io/features/llm-token-counter/), and inspect the exported chunks in the [JSON formatter](https://meetrix.io/features/json-formatter/). Once your chunks look right, the [vector database storage calculator](https://meetrix.io/features/vector-database-storage-calculator/) turns the chunk count into memory and storage, and the chunks need a vector database: the [Milvus developer guide](https://meetrix.io/blogs/milvus-developer-guide/) walks through running one on AWS, and the [Milvus vector database](https://meetrix.io/store/milvus/) is ready to launch from the Meetrix store. You can also browse [all Meetrix features](https://meetrix.io/features/).

## Frequently Asked Questions

Is this RAG chunking visualizer free?

Yes. It is free, needs no account, and has no limit on how many documents or settings you try.

Are my documents uploaded?

No. Splitting is plain text processing in your browser: no model, no server and no download is involved, so your document never leaves the page. The page records anonymous usage events (the tool was used, chunks were exported), never the text.

What is chunking in RAG?

Retrieval-augmented generation answers questions from your own documents. Because embedding models and prompts have size limits, each document is first split into chunks. Every chunk is embedded and stored in a vector database, and at query time the closest chunks are retrieved and given to the model. How you split decides what the retriever can find.

What chunk size should I use for RAG?

There is no universal best. A common starting point is 500 to 1,000 characters (roughly 128 to 256 tokens) for question answering over prose, and larger chunks for long-form reasoning. Keep chunks under your embedding model's input limit, then test retrieval with real questions and adjust.

How much chunk overlap should I use?

10 to 20 percent of the chunk size is the usual starting point, for example 50 to 100 characters on a 500-character chunk. Overlap keeps a sentence that falls on a boundary whole in at least one chunk. More overlap means more chunks to embed and store, and more near-duplicate results.

Does this match LangChain's RecursiveCharacterTextSplitter?

Yes, for the recursive strategy. It is a direct port of `RecursiveCharacterTextSplitter` with its defaults: separators `"\n\n"`, `"\n"`, `" "` and `""`, separators kept at the start of the next piece, and whitespace stripped. Our tests compare it with the Python library's output across prose, Markdown, code and Unicode. The other strategies are simple reference implementations, not ports of a specific library.

Why are my chunks smaller than the chunk size?

The splitter adds pieces (paragraphs, then lines, then words) until the next one would go over the limit, so most chunks stop short of it. Overlap carried from the previous chunk and whitespace stripped from the ends also take some length. The average size in the stats is usually 70 to 90 percent of the setting.

Can a chunk be larger than the chunk size?

Not with LangChain's default separators, because the last one, an empty string, splits between single characters. With custom separators that lack it, a piece that cannot be split stays whole, and LangChain logs "Created a chunk of size ..., which is longer than the specified ...". The stats flag any chunk over the limit in red.

Should I measure chunks in characters or tokens?

Embedding models limit input in tokens, but LangChain counts characters unless you give it a token-based length function. Characters are exact and predictable; tokens match the model's limit. The token mode here estimates 4 characters per token. For exact counts with a specific model, check a chunk in the [LLM token counter](https://meetrix.io/features/llm-token-counter/).

When should I use Markdown header splitting?

For documentation, wikis and anything written in Markdown. Splitting at headings first keeps every chunk inside one section, and the heading path (for example "Install > Requirements") is exported with each chunk, which you can store as metadata for filtering or prepend to the chunk before embedding.

What about semantic chunking?

Semantic chunking splits where the meaning changes, using an embedding model to compare neighbouring sentences. It needs a model, so it is not included here. Recursive or Markdown splitting is the usual baseline to beat before trying it.

What is in the JSON export?

One object per chunk with `index`, `text`, `start_index` (the character offset in your document, counted the same way as LangChain's `add_start_index`), `length` and, for Markdown splitting, `headers`. JSONL puts one chunk per line, which most embedding and vector database loaders accept directly.

Meetrix Store

Self-host the open source software your team already uses, on your own AWS or Google Cloud account.

 [Milvus Vector search for RAG, no per-query fees](https://meetrix.io/store/milvus/) [Browse the store](https://meetrix.io/store/)

## Run open source tools on your own cloud

Meetrix Store has pre-configured images for Jitsi Meet, Coturn, RustDesk, OpenVPN and 40+ more open source tools, ready to launch on AWS or Google Cloud in minutes.

[Browse the store](https://meetrix.io/store/) [Talk to Us](https://meetrix.io/contact-us/)

Meetrix Store New

Open source tools, ready to launch on your own AWS or Google Cloud.

-    [Milvus Vector search for RAG, no per-query fees](https://meetrix.io/store/milvus/)
-    [Flowise Build chatbots and RAG pipelines visually](https://meetrix.io/store/flowise/)
-    [OpenWebUI A private ChatGPT-style assistant](https://meetrix.io/store/openwebui/)
-    [Jitsi Meet Self-hosted video calls for 50 to 500 users](https://meetrix.io/store/jitsi-meet/)
-    [RustDesk Remote desktop AMI, a TeamViewer alternative](https://meetrix.io/store/rustdesk/)
-    [Coturn TURN/STUN for WebRTC, no per-minute relay fees](https://meetrix.io/store/coturn/)

[Browse all products](https://meetrix.io/store/)
