Split Markdown into RAG Chunks - Heading-Aware Text Splitter
Pricing
from $0.10 / 1,000 chunk createds
Split Markdown into RAG Chunks - Heading-Aware Text Splitter
Split Markdown into heading-aware chunks for RAG. $0.0001 per chunk created. Empty input free. Works from Apify MCP and the API.
Pricing
from $0.10 / 1,000 chunk createds
Rating
0.0
(0)
Developer
Tidy Byte Tools
Maintained by CommunityActor stats
0
Bookmarked
1
Total users
0
Monthly active users
9 days ago
Last modified
Categories
Features
Share
Markdown Chunker for RAG - Heading-Aware Text Splitter
Split Markdown into chunks for RAG, vector databases and AI search. Keeps code blocks and tables whole. Each chunk has its heading path and line numbers. $0.0001 per chunk.
Also searched as: ES: dividir Markdown en chunks para RAG / PT: dividir Markdown em chunks / DE: Markdown in Chunks teilen / FR: découper du Markdown pour le RAG / JA: Markdownチャンク分割、RAG
Example
Input:
# Garden GuideWelcome! This guide helps you start a small garden.## ToolsYou need a shovel, a rake and gloves.## PlantingPlant tomatoes after the last frost. Give them sun.```pythondef water(plant):return plant + " is wet"```
Output from an actual run (3 chunks, with heading path, line numbers, and text):
{"heading_path": ["Garden Guide"], "start_line": 1, "end_line": 3, "text": "# Garden Guide\n\nWelcome! This guide helps you start a small garden."}{"heading_path": ["Garden Guide", "Tools"], "start_line": 5, "end_line": 7, "text": "## Tools\n\nYou need a shovel, a rake and gloves."}{"heading_path": ["Garden Guide", "Planting"], "start_line": 9, "end_line": 16, "text": "## Planting\n\nPlant tomatoes after the last frost. Give them sun.\n\n```python\ndef water(plant):\n return plant + \" is wet\"\n```"}
The free local tool is md-chunk-lite.
Website and local versions
- Website — Tidy Byte Tools product page
- Free local CLI + MCP —
pip install md-chunk-lite(runs on your computer) - Offline Pro on Gumroad — one-time download, no per-run fee
What it does
- Splits by headings first, so each chunk stays on one topic.
- Never cuts a code block or table in the middle when it fits.
- Gives each chunk an id, heading path, anchor and line numbers.
- Optional overlap between chunks.
- Ready for vector databases (one chunk per dataset row).
Price
You pay $0.0001 per chunk created (One chunk saved to the dataset.) There is no start fee from us. Apify adds its normal small platform cost. Set a max cost for the run and we stop there. We never charge for work we did not save.
How to use
- Add links or paste your data.
- Click Start.
- Get results in the Output tab, or download them as CSV, Excel or JSON.
Input
- Markdown file links: Links to .md files (raw GitHub links work).
- Or paste Markdown: Paste Markdown here.
- Max characters per chunk: Chunks are never longer than this.
- Overlap characters: Repeat this many characters from the last chunk. Up to half of max.
- Put heading path at the top of each chunk: Adds 'Guide > Install' above the text. Helps search.
Example input
This is also the default sample, so a first run works if you just click Start.
{"markdownText": "# Guide\n\nHello.\n\n## Install\n\n```bash\npip install tool\n```\n\n## Use\n\n| a | b |\n|---|---|\n| 1 | 2 |\n","maxChars": 1500,"overlapChars": 0,"prefixHeadingPath": false}
FAQ
What is a heading path?
It is the list of headings above a chunk, like Guide > Install. That helps search tools know what the chunk is about.
Will it cut a code block or a table in half? Not if the block fits in the max character size. If a single block is longer than the max, it has to be split.
Can I use a raw GitHub link?
Yes. Paste a link that downloads the .md file itself (a raw GitHub link works). You can also paste the Markdown text.
Is there a free version?
Yes. md-chunk-lite is free on GitHub and PyPI and runs on your own computer.
Do you keep my text? Your text is used only for your run. Results stay in your own Apify storage, under your storage retention settings.
What do I pay for? You pay $0.0001 for each chunk saved to the dataset. Apify also adds its small standard start fee per run.
Good to know
- Files up to 50 MB each.
- Your data is only used for your run.
- Made by Tidy Byte Tools. Questions? Open an issue on this Actor's page.
More tools from Tidy Byte Tools
These Actors work well together:
- PDF Table Extractor — PDF tables to CSV, Excel and JSON. $0.003 per page with a table.
- PDF, Word and Web Page to Markdown — Clean Markdown and RAG chunks. $0.003 per file.
- HTML Table Extractor — Web tables to CSV and JSON. $0.0005 per data row.
- Broken Link Checker — Check site and sitemap links. $0.001 per link.
- Markdown Chunker for RAG — Split Markdown by headings. $0.0001 per chunk.
- CSV and Excel Data Cleaner — Dedupe and fix dates, emails and phones. $0.0005 per clean row.
- JSON to CSV Converter — Flatten nested JSON for spreadsheets. $0.0001 per row.
- CSV Encoding Fixer and Splitter — Fix garbled letters like é and split big files. $0.01 per file.
- Phone Number Validator — Check and format numbers offline. $0.001 per number.
- LLM Token Counter — Offline token and cost estimates for GPT, Claude and Gemini. $0.0005 per unique text.
Free local tools (no Apify account needed): pdf-table-pull-lite, doc2md-lite, link-check-lite, md-chunk-lite, json-shaper-lite.
Website: https://tidybytetools.github.io. All Actors: apify.com/tidybytetools.
Agent tip
Split Markdown into heading-aware chunks for RAG. $0.0001 per chunk created. Empty input free. Works from Apify MCP and the API.