Home / Tools / Markdown Chunker for RAG
AI / RAG
Markdown Chunker for RAG
Split Markdown into chunks for AI search, with heading paths kept.
About $1 per 10,000 chunks.
Split a Markdown file by heading so each chunk stays on one topic. Code blocks and tables stay whole when they fit. Each chunk keeps its heading path and line numbers. This is plain code, not an AI model, so the same file always gives the same chunks.
What it does
- Splits by headings first, so each chunk stays on one topic.
- Avoids cutting a code block or table in the middle when it fits.
- Gives each chunk an id, heading path, and line numbers.
- The free lite tool is a CLI and an MCP server you run on your computer.
Before and after
Markdown with headings
# Garden Guide
## Tools
You need a shovel, a rake and gloves.
## Planting
### Tomatoes
Plant tomatoes after the last frost. Give them sun.
One chunk (heading path kept)
{
"id": "guide.md#3",
"heading_path": ["Garden Guide", "Planting", "Tomatoes"],
"start_line": 9,
"text": "Plant tomatoes after the last frost. Give them sun."
}
From md-chunk-lite/tests/fixtures/guide.md and the chunk tests.
Get it
Pay per use · Apify · $0.0001 per chunk
Free lite · GitHub & PyPI · Free
Markdown and plain text. CLI and MCP server. It does not read PDF or Word files.
FAQ
What does this tool do?
Split Markdown into chunks for AI search, with heading paths kept. Split a Markdown file by heading so each chunk stays on one topic. Code blocks and tables stay whole when they fit. Each chunk keeps its heading path and line numbers. This is plain code, not an AI model, so the same file always gives the same chunks.
What does it cost?
Pay per use on Apify costs $0.0001 per chunk. Free lite on GitHub & PyPI costs Free. Markdown and plain text. CLI and MCP server. It does not read PDF or Word files.
Will you see my files?
The download tools run on your computer, so those files stay with you. The Apify tools run in your own Apify account. This website does not take uploads.
Does the free tool work with AI apps?
Yes. The free lite version includes a small MCP server. You can use it from Cursor, Claude Desktop, and other apps that support MCP. No API key is needed.