Skip to tool
JoeLucky

Click ★ on a tool to save it

Tool Categories

Base64 Encoder/DecoderJSON Tree ViewerHOTJWT Encoder/DecoderUUID GeneratorURL Encoder / DecoderJSON to CSVCSV to JSONJSON to YAMLYAML to JSONJSON to XMLXML to JSONCSV to YAMLYAML to CSVJSON FormatterYAML FormatterXML FormatterHTML FormatterCSS FormatterRegex TesterHash GeneratorCron ParserHTML Entity Encoder/DecoderNumber Base ConverterURL Parser / Query InspectorCSV Viewer/ValidatorMarkdown PreviewSQL FormatterMermaid Live EditorLLM API Cost CalculatorNEWLLM VRAM CalculatorNEWRAG Chunk VisualizerNEWCloud Storage Cost Calculator (S3, R2, B2)NEWSLA Uptime CalculatorNEW
JoeLucky

Practical online tools, all in one place

Privacy PolicyTerms of Service

© 2026 JoeLucky®. All rights reserved.

  1. JoeLucky
  2. /Developer
  3. /RAG Chunk Visualizer

RAG Chunk Visualizer

Paste a document to see RAG chunking and embedding cost estimates live. Your text is never uploaded.

Report

SIMILAR DEVELOPER

View all
LLM API Cost Calculator

Compare per-request and monthly API costs across OpenAI, Anthropic and Gemini, with the price check date.

Open →
LLM VRAM Calculator

Estimate the VRAM an LLM needs and check whether it fits on your GPU.

Open →
Text Diff Checker

Compare two texts by line, word, or character, with side-by-side or unified views and options to ignore whitespace/case

Open →

💬 Comments

?

No comments yet. Be the first!

WHAT IS RAG CHUNK VISUALIZER?

The RAG Chunk Visualizer lets you paste a document and instantly see how different splitting strategies (fixed size, recursive, by sentence, Markdown headings) cut it into chunks: each chunk gets an alternating tint, overlaps get their own color, and statistics show the chunk count, average and largest tokens, redundancy and chunks that end mid-sentence. Add an embedding model and price to estimate embedding cost and vector-database storage.

How to use?

  1. Paste the document, or load a .txt/.md file (read locally only).
  2. Choose the strategy, the size unit (characters or estimated tokens), the chunk size and the overlap.
  3. Read the colored preview, the statistics and the chunk list, and adjust and compare as needed.
  4. Pick an embedding model and enter a price and document count to estimate embedding cost and vector storage; copy or download the chunks as JSON.

Notes

  • Example: with 120-token chunks and a 20-token overlap, about 17% of neighbouring content repeats, so total embedded tokens and vector count rise compared with no overlap.
  • Tokens are estimates (about 4 characters ≈ 1 token in English, about 1 character ≈ 1 token in CJK); use the embedding model's own tokenizer for exact numbers.
  • There is no best fixed size: check retrieval against real questions, then tune size and overlap; the index factor for vector storage is an adjustable assumption.
  • Text, files and results stay in your browser and are not uploaded.

Frequently asked questions

What chunk size should I use for RAG?

There is no universal number. Large chunks blur several topics into one vector and retrieve less precisely; tiny chunks scatter an answer across pieces. A common starting point is chunks of a few hundred tokens with roughly 10% overlap; then check retrieval against the questions you really ask and tune from there.

What is overlap for, and what does it cost?

Overlap lets neighbouring chunks share a little text so information sitting on a boundary is not cut off. The price is that the same text is embedded and stored twice, which raises embedding cost and vector storage directly; the "redundancy" statistic measures exactly that.

How do I choose among the four strategies?

Fixed size is simplest and most predictable but may cut sentences. Recursive splitting tries paragraphs, lines, sentences and spaces in turn to stay on natural boundaries and is a good general starting point. Sentence splitting never breaks mid-sentence. Markdown-heading splitting suits structured documents, keeps code blocks whole and records each chunk's heading path.

Why do token counts here differ from my embedding model's?

This tool uses a rough rule (about 4 characters ≈ 1 token in English, about 1 character ≈ 1 token in CJK), while every embedding model has its own tokenizer, so real numbers differ. Treat "tokens (estimated)" as a relative yardstick for comparing settings; for exact figures or to check a model's input limit, confirm with that model's tokenizer.

How is vector storage estimated, and what is the index factor?

Storage = chunks × vector dimensions × bytes per dimension (4 for float32, 2 for float16, 1 for int8, 1/8 for binary) × index factor + chunks × payload per chunk. The index factor stands for the extra space an approximate-search index such as HNSW needs on top of the raw vectors, commonly about 1.2 to 2 depending on parameters; you can adjust it.

Is the document I paste uploaded?

No. Splitting, statistics and the visualization all run in your browser, and a loaded .txt or .md file is only read locally. The tool calls no embedding API; the embedding cost is just a calculation from the price you enter.

Files are read inside your browser and are not uploaded.
Splitting strategy

Splits on paragraphs → lines → sentences → spaces, staying on natural boundaries where it can (like the default of popular frameworks).

Size unit

Overlap 17%

Result

Chunks3
Average tokens88
Smallest / Largest68 / 112
Redundancy1.051.00 = no duplication; 1.20 = about 20% of the content appears twice.
Chunks ending mid-sentence3 / 3
Content coverage100%
Total tokens to embed (with overlap)264

Visualization

Chunk (alternating tint) Overlap
# Retrieval-augmented generation Retrieval-augmented generation (RAG) combines a search step with a language model. Documents are split into chunks, each chunk is embedded as a vector, and the closest chunks are retrieved to answer a question. ## Why chunking matters If chunks are too large, a single vector blurs several topics together. If they are too small, the answer may be spread across chunks that never get retrieved together! Overlap lets neighbouring chunks share a little context, at the price of storing the same words twice. ## 中文與日本語の例 檢索增強生成會先把長文件切成較小的區塊,再把區塊轉成向量。區塊太大會混入多個主題;區塊太小又可能把答案拆散。検索拡張生成では、文書を適切な大きさに分割することが重要です。 ```python chunks = splitter.split_text(document) print(len(chunks)) ```

Chunk list

Chunk list
#TokensCharsPreview
168269# Retrieval-augmented generation Retrieval-augmented generation (RAG) combines a search step with a language model. Documents are split into chunks, each chunk· ends mid-sentence
284309## Why chunking matters If chunks are too large, a single vector blurs several topics together. If they are too small, the answer may be spread across chunks t· ends mid-sentence
3112171## 中文與日本語の例 檢索增強生成會先把長文件切成較小的區塊,再把區塊轉成向量。區塊太大會混入多個主題;區塊太小又可能把答案拆散。検索拡張生成では、文書を適切な大きさに分割することが重要です。 ```python chunks = splitter.split_text(document) print(len(c· ends mid-sentence

Embedding cost and vector storage

Extra space of an ANN index (e.g. HNSW) relative to the raw vectors; commonly about 1.2–2 depending on parameters.

Total chunks3
Total tokens to embed264
Raw vectors18.43 KB
With index27.65 KB
Payload1.5 KB
Total storage29.15 KB

Embedding dimensions and input limits come from each vendor's docs or model configs (verified 2026-10-20).

Tokens are estimates (about 4 characters = 1 token for English, about 1 character = 1 token for CJK); use your embedding model's own tokenizer for exact numbers. Everything is processed in your browser and the text is not uploaded.

How it is calculated
  • The "tokens (estimated)" unit uses the same rough weights as the cost calculator: ASCII 0.25, CJK 1, other 0.8 token per character.
  • Fixed size advances by size − overlap; recursive and sentence strategies combine natural units, and the overlap only carries whole units that fit the setting.
  • Redundancy = total chunk characters ÷ original characters; it directly raises embedding cost and vector storage.
  • Storage = chunks × dimensions × bytes per dimension × index factor + chunks × payload.
  • There is no best fixed size: check retrieval results against your real questions, then tune size and overlap.