Tidewell Software

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

  1. Heading levels. #/## structure lets you split by section and keep a heading path in each chunk.
  2. Tables. Markdown tables survive embedding far better than flattened text.
  3. Reading order. Two-column papers must be read column by column.
  4. OCR only where needed. OCR on a digital page is slower and less exact than its text layer.
  5. Chunk metadata. Page numbers and heading paths make citations possible.
  6. Where it runs. Self-hosted, a hosted API, or in your browser; matters for confidential files.

Open-source libraries (self-hosted)

Open-source document converters (licences and descriptions from each GitHub repository, 8 November 2026)
ProjectLicenceGitHub starsHow the project describes itself
Docling (docling-project)MIT70kGet your documents ready for gen AI
Marker (datalab-to)Apache-2.041kConvert PDF to markdown + JSON quickly with high accuracy
MarkItDown (Microsoft)MIT194kPython tool for converting files and office documents to Markdown
MinerU (opendatalab)See repository83kTransforms complex documents like PDFs and Office docs into LLM-ready markdown/JSON
UnstructuredApache-2.016kOpen-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

Document-to-text actors on the Apify Store (Store data fetched 6โ€“8 Nov 2026)
ActorUsers (30 days)PriceFormats and output
automation-lab / pdf-text-extractor130$0.005 run start + $0.00345/PDFPDF only; no OCR, no Markdown, no chunking
lergassy / document-text-extractor24$0.0035/doc + $0.00015/page + $0.010/OCR pageMulti-format with chunks
memo23 / pdf-text-extractor190 (5.0โ˜…)$0.005/PDF + $0.005 start; $0.015/OCR pagePDF only; no chunking feature
nerolabs / bulk-ocr-image-pdf-to-text39$0.005/OCR page, $0.001/text page, $0.01/export filePDF and images; no Markdown, no chunking
tidewell / doc-to-markdown (ours)New$0.002/doc + $0.0003/page; OCR page $0.003 totalPDF, 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.