Markdown Chunker for LLMs
Split long Markdown documents into token-budget chunks for RAG pipelines and LLM context windows.
Loading tool...
What is Markdown Chunker for LLMs?
The Markdown Chunker for LLMs splits long Markdown documents into token-budget chunks built for RAG pipelines, embeddings, and LLM context windows. It parses the document structure first β headings, fenced code blocks, and paragraphs β then packs blocks into chunks that respect your token budget, optionally repeating trailing blocks as overlap and prepending heading breadcrumbs so every chunk carries its own context. Everything runs offline in your browser.
Key Benefits
- Fits any context window: choose budgets from 256 to 8192 tokens per chunk.
- Markdown-aware: code fences and tables are never cut mid-block.
- Retrieval-friendly: heading breadcrumbs give embeddings topical context.
- Boundary-safe: overlap keeps sentences from being severed at chunk edges.
- Private and offline: documents are processed locally, never uploaded.
- Pipeline-ready: JSONL export plugs straight into LangChain and LlamaIndex.
Common Use Cases
- β’Preparing internal documentation for a RAG chatbot.
- β’Splitting long API references into embeddable sections.
- β’Chunking README files and design docs for semantic search.
- β’Feeding documentation into an LLM with a limited context window.
- β’Building evaluation datasets of document chunks for LLM testing.
- β’Preprocessing Markdown notes for local vector databases.
How to Use the Markdown Chunker for LLMs
- Paste or upload your Markdown: Paste your documentation into the input box, or click Upload .md to load a file from your device. Nothing is sent anywhere β parsing happens in your browser.
- Set the token budget: Choose how many tokens each chunk may hold, from 256 to 8192. Common RAG recipes use 512 or 1024 with 50-100 tokens of overlap.
- Pick an estimator and options: Use characters Γ· 4 for English documents, or words Γ 1.3 for Thai and other non-English text. Enable heading context and code-block protection as needed.
- Copy or export the chunks: Review the generated chunks with their token counts and heading breadcrumbs, then copy any chunk, copy all, or download everything as JSONL or Markdown.
Key Features
- Token-budget chunking with presets from 256 to 8192 tokens per chunk.
- Markdown-aware splitting that keeps fenced code blocks and tables intact.
- Two token estimators: characters Γ· 4 for English, words Γ 1.3 for Thai and other languages.
- Configurable overlap that carries trailing blocks into the next chunk for continuity.
- Heading breadcrumbs (e.g. Guide / Install / Linux) prepended to each chunk for retrieval context.
- Export chunks as JSONL for LangChain/LlamaIndex, as Markdown, or copy one by one.