Markdown Splitter

Split Markdown into chunks by header level. Inspired by LangChain's MarkdownHeaderTextSplitter — perfect for RAG pipelines and vector databases.

Include header in chunk
Markdown Input
Chunks

Paste Markdown on the left to see chunks here

How to Use

  1. Paste your Markdown content into the left panel, or click Upload .md to load a file (max 2MB).
  2. Choose a Split by level — H1 only, H1 + H2, or H1 + H2 + H3.
  3. Toggle Include header in chunk to control whether the heading line is part of each chunk.
  4. Browse the chunks on the right. Click Copy to copy a single chunk, or Copy All as JSON to export everything.
  5. Use the expand/collapse button on each card to read the full chunk content.

Use Cases

  • RAG pipelines — split documentation into chunks before embedding into a vector database like Pinecone, Weaviate, or Chroma.
  • LangChain workflows — mirrors the behaviour of MarkdownHeaderTextSplitter for preparing documents for LLM context windows.
  • Documentation review — break long docs into sections for focused editing or summarisation.
  • Content migration — extract individual sections from large Markdown files for CMS imports.
  • AI fine-tuning datasets — generate structured training data from technical documentation.

FAQ

What is the maximum file size?

Files up to 2MB are supported. Most Markdown documents are well under this limit.

Is my content sent to a server?

No — all splitting happens entirely in your browser. Nothing is uploaded or stored.

What does "Include header in chunk" do?

When on, the heading line (e.g. ## Section Title) is included at the top of each chunk. Turn it off to get body content only.

What does Copy All as JSON output?

A JSON array where each item has index, header, content, and chars — ready to pipe into your embedding pipeline.