Comparison ยท facts checked 8 November 2026
Best PDF to Markdown converters for RAG
Short answer: for RAG you want a converter that keeps headings (they become chunk boundaries), keeps tables as tables, OCRs only scanned pages, and returns chunks with page and heading metadata for citations. If you can run Python, the open-source libraries Docling (MIT), Marker (Apache-2.0), MarkItDown (MIT) and Unstructured (Apache-2.0) are free. If you want a hosted, pay-per-page API, the Apify Store has several; ours, tidewell/doc-to-markdown, costs $0.30 per 1,000 digital pages plus $0.002 per document. For a one-off file, our free in-browser converter does the first 3 pages without uploading anything.
What matters for RAG
- Heading levels.
#/##structure lets you split by section and keep a heading path in each chunk. - Tables. Markdown tables survive embedding far better than flattened text.
- Reading order. Two-column papers must be read column by column.
- OCR only where needed. OCR on a digital page is slower and less exact than its text layer.
- Chunk metadata. Page numbers and heading paths make citations possible.
- Where it runs. Self-hosted, a hosted API, or in your browser; matters for confidential files.
Open-source libraries (self-hosted)
| Project | Licence | GitHub stars | How the project describes itself |
|---|---|---|---|
| Docling (docling-project) | MIT | 70k | Get your documents ready for gen AI |
| Marker (datalab-to) | Apache-2.0 | 41k | Convert PDF to markdown + JSON quickly with high accuracy |
| MarkItDown (Microsoft) | MIT | 194k | Python tool for converting files and office documents to Markdown |
| MinerU (opendatalab) | See repository | 83k | Transforms complex documents like PDFs and Office docs into LLM-ready markdown/JSON |
| Unstructured | Apache-2.0 | 16k | Open-source ETL for transforming complex documents into clean, structured formats for language models |
These are free apart from your own compute, and some use machine-learning models that run best on a GPU. Test them on your own documents; quality varies by layout.
Hosted APIs on the Apify Store
| Actor | Users (30 days) | Price | Formats and output |
|---|---|---|---|
| automation-lab / pdf-text-extractor | 130 | $0.005 run start + $0.00345/PDF | PDF only; no OCR, no Markdown, no chunking |
| lergassy / document-text-extractor | 24 | $0.0035/doc + $0.00015/page + $0.010/OCR page | Multi-format with chunks |
| memo23 / pdf-text-extractor | 190 (5.0โ ) | $0.005/PDF + $0.005 start; $0.015/OCR page | PDF only; no chunking feature |
| nerolabs / bulk-ocr-image-pdf-to-text | 39 | $0.005/OCR page, $0.001/text page, $0.01/export file | PDF and images; no Markdown, no chunking |
| tidewell / doc-to-markdown (ours) | New | $0.002/doc + $0.0003/page; OCR page $0.003 total | PDF, DOCX, PPTX, XLSX, HTML, EPUB, images; Markdown and chunks with page and heading metadata; OCR in 25 languages |
Which to choose
- You run Python and process many documents: start with an open-source library and measure it on your files.
- You want an API with no infrastructure, mixed formats and scans: a hosted actor. Ours is cheapest among these for OCR pages ($3 per 1,000); lergassy is cheapest per digital page; memo23's flat $0.005 per PDF is cheaper for very long digital PDFs.
- A single confidential PDF: convert in your browser so the file never leaves your machine.
Details of ours: Document to Markdown for LLM & RAG.
Disclosure: Tidewell Software makes Document to Markdown (tidewell/doc-to-markdown) and the free PDF to Markdown tool. We list it alongside the alternatives, in no ranked order, and say where another option is the better fit. Figures are the platforms' own public numbers, checked on 8 November 2026. Corrections are welcome by email.
Frequently asked questions
Why convert PDFs to Markdown for RAG instead of plain text?
Markdown keeps headings, lists and tables. Headings give natural chunk boundaries and a heading path for each chunk, and tables stay readable to the model, which plain text loses.
Can I convert a PDF to Markdown without uploading it?
Yes. Our free PDF to Markdown converter runs pdf.js in your browser and converts the first 3 pages locally; nothing is uploaded.
Do I need OCR?
Only for scanned pages or images with no text layer. Digital PDFs should be read from their text layer, which is exact and faster.
Last updated 8 November 2026. Questions or corrections: benjamin@benjaminbritton.co.uk.