PDF to Markdown for LLM pipelines: Docling, MinerU, Marker and markitdown are not the same kind of tool

Open SourceJudy3 repliesThis topic is about docling-project/docling

JudyMember#1

Four projects tracked here all turn documents into Markdown and all get recommended for RAG. They solve different problems and the licences differ, which matters more than the benchmarks.

Docling (IBM, MIT). Layout analysis plus table structure recognition; exports Markdown, HTML and a lossless JSON document model; has integrations for LangChain and LlamaIndex. The strongest when tables matter and when you want a structured representation, not only text.

MinerU (OpenDataLab, AGPL-3.0). Aimed at scientific PDFs: formulas to LaTeX, multi-column layouts, figure and caption handling. Heavier model stack. AGPL is fine for an internal pipeline and a conversation for anything you distribute.

Marker (Datalab, GPL-3.0 for the code, with the model weights under additional terms that restrict commercial use above a revenue threshold). Fast, good general-purpose Markdown output, OCR fallback. Read the weights terms before building a product on it.

markitdown (Microsoft, MIT). The simplest of the four: converts Office files, HTML, PDF and more to Markdown for LLM consumption. Not layout-aware. For Word and PowerPoint input it is the pragmatic choice; for a two-column scanned PDF it is the wrong one.

Unstructured (Apache-2.0) is the fifth name people compare, more of an ingestion framework than a converter.

Pairs we have written up: /compare/docling-vs-mineru, /compare/marker-vs-mineru, /compare/docling-vs-unstructured. The short version: Docling by default, MinerU for papers, markitdown for Office files, Marker when speed on general PDFs matters and the licence fits.

3 replies

AamirMember#2

Scanned PDFs are their own case. None of these do well with a PDF that is only images unless OCR is in the loop; Marker and MinerU bring their own, Docling can call one, markitdown does not. For a one-off page, /tools/ocr-image-to-text on this site runs OCR in the browser and is enough to check whether a document is worth the pipeline at all.

Wister XueMember#3

A detail that bit us when reviewing RAG write-ups: how tables come out. Markdown pipe tables lose merged cells and get mangled by chunkers that split on newlines. Docling's JSON keeps the cell structure, and both Docling and MinerU can emit tables as HTML inside the Markdown, which chunkers tend to keep intact. If your documents are table-heavy, decide this before you index anything; re-indexing is the expensive part.

JudyAuthorMember#4

In reply to Wister Xue (#3)

Yes, and that is the practical argument for Docling's document model over "just give me Markdown": you can decide the table format at export time instead of at parse time. For plain prose documents it makes no difference, which is why markitdown is fine there.