PDF to Markdown for RAG pipelines
Retrieval quality starts at parsing. Markdown gives you headings to chunk on and metadata to store, instead of a flat wall of text.
PDF to Markdown for RAG pipelines is a free online tool by Hack the Hydra. Convert PDFs to Markdown for RAG pipelines and vector databases. Heading-aware chunks, tables, OCR via API. Free browser version.
100% freeNo upload: runs in your browserNo sign-up
Chunk on structure, not on character count
Split the Markdown on #, ## and ### headings first, then cap chunk size. Store the heading path ("Pricing > Enterprise > Limits") as metadata and prepend it to the chunk text before embedding. Retrieval improves because every chunk carries its context.
Tables
Tables flattened into text are one of the main causes of wrong RAG answers. The API version outputs real Markdown tables, which embed and render far better.
Scanned documents
A RAG index silently misses scanned PDFs because they contain no text. The API OCRs pages without a text layer and reports how many pages needed OCR, so you can flag low-quality sources.
How to use
- Drop your file in the box above, or click to pick it.
- Wait a few seconds while it converts locally.
- Copy the result or download it.
FAQ
Which chunk size should I use?
Start with sections split on headings, capped around 500 to 1,000 tokens with a small overlap, then tune on your own evaluation questions.
Does this work with LangChain or LlamaIndex?
Yes. Both have Markdown splitters that use headings. Feed them the Markdown output.
How do I process thousands of PDFs?
Use the API: $3 per 1,000 PDFs, and failed files are not charged.
Bulk conversion API
Need hundreds of PDFs, scanned PDFs (OCR) or real Markdown tables? Use the API: $3 per 1,000 PDFs, failed files free. Open the API →
curl -X POST "https://api.apify.com/v2/acts/extas_corp~pdf-to-markdown/run-sync-get-dataset-items?token=YOUR_TOKEN" \
-H "Content-Type: application/json" -d '{"pdfUrls":[{"url":"https://arxiv.org/pdf/1706.03762"}]}'
Use it via API, with a free plan: Document to Markdown API (RapidAPI) · Apify
More free converters