Docling vs MinerU: Which Open-Source PDF Parser Should You Use for RAG?
Docling vs MinerU: Which Open-Source PDF Parser Should You Use for RAG?
Both Docling and MinerU are open-source tools built to turn messy PDFs into clean Markdown for AI pipelines, and both show up constantly in RAG and document-parsing discussions on Reddit and LinkedIn. Docling comes out of IBM Research and is now maintained under the LF AI & Data Foundation. MinerU comes out of OpenDataLab (Shanghai AI Lab) and was built to handle the kind of dense scientific literature that trips up simpler extractors. They overlap heavily, but the details — licensing, hardware needs, and what each is actually good at — matter once you have to pick one for production.
This guide compares them directly for PDF-to-Markdown conversion. If you'd rather skip installing either, file2markdown converts the same files to clean Markdown through a browser or REST API, no models to download.
The Quick Answer
Use Docling when you want a fast, lightweight, MIT-licensed parser that's easy to run on CPU and integrates cleanly into a standard Python RAG stack.
Use MinerU when your documents are dense scientific papers, contain heavy math notation, or are in Chinese, Japanese, or Korean — MinerU's layout and formula models are specifically tuned for that content.
Use file2markdown when you want hosted PDF-to-Markdown conversion with OCR included, without installing either toolchain or managing model weights.
What Each Tool Actually Does
Docling runs AI layout models over a PDF to detect reading order, headings, and table structure, then exports a DoclingDocument you can render to Markdown, HTML, or JSON. It's built for speed and a small footprint — it runs comfortably on CPU and installs with a single pip install docling. Beyond PDF, it also parses Office formats, HTML, EPUB, and — as of recent releases — audio/video transcripts and email files.
MinerU is a document-parsing pipeline built specifically for high-precision extraction: layout detection, OCR, table recognition, and formula recognition, with four selectable quality tiers (Flash, Basic, Standard, Advanced) that trade speed for accuracy. It converts tables to HTML and formulas to LaTeX rather than flattening them into plain text, which matters for academic and financial documents where structure carries meaning. It also accepts a wide range of Office and archive formats (DOC/DOCX, PPT/PPTX, XLS/XLSX, RTF, ODT/ODS/ODP, EPUB) alongside PDFs and images, and can render output as Markdown, HTML, LaTeX, DOCX, EPUB, or a structured content list.
Head-to-Head Comparison
| Docling | MinerU | |
|---|---|---|
| Maintainer | LF AI & Data Foundation (originated at IBM Research) | OpenDataLab (Shanghai AI Lab) |
| GitHub stars | ~67,700 | ~80,500 |
| Core strength | Speed, simplicity, general documents | Complex layouts, math formulas, CJK text |
| Formula output | Not a focus | Converts to LaTeX |
| Table output | Markdown pipe tables | Converts to HTML |
| CJK language support | Basic | Strong (built for it) |
| Hardware | Runs well on CPU | CPU by default; GPU recommended for top accuracy tier |
| License | MIT | MinerU Open Source License (Apache 2.0-based, with terms below) |
| Install footprint | Moderate (layout/table models) | Larger (multiple model tiers) |
| Interfaces | Python API, CLI | Python SDK, CLI, REST API, Gradio WebUI, MCP server |
Installing and Using Each
Docling
pip install docling
from docling.document_converter import DocumentConverter
result = DocumentConverter().convert("paper.pdf")
print(result.document.export_to_markdown())
MinerU
pip install "mineru>=4.0,<5"
mineru -p paper.pdf -o ./output
MinerU's CLI defaults to ONNX-based CPU inference; its higher-accuracy VLM tier runs on llama.cpp and benefits from GPU acceleration but doesn't strictly require it.
Licensing: Read This Before You Choose MinerU
This is the detail most comparisons get wrong. MinerU is not AGPL — it ships under the MinerU Open Source License, a custom license based on Apache 2.0. In practice, that means:
- Commercial use is unrestricted unless your product exceeds 100 million monthly active users or USD 20 million in monthly revenue — at either threshold, you need a separate commercial license from the MinerU team.
- If you offer MinerU's output as part of an online service, you're required to clearly indicate that MinerU is being used.
- Failing to meet either obligation once you hit the threshold automatically terminates your license grant.
For nearly every individual developer, startup, or research team, this is a non-issue — you're free to use MinerU commercially. But it's a meaningfully different deal than Docling's plain MIT license, which has no usage thresholds or attribution requirements at all. If you're building something you expect to scale to enterprise size, read MinerU's license terms directly before committing to it.
Formulas, Tables, and CJK: Where MinerU Pulls Ahead
Docling's table-structure model handles general business documents well, but it wasn't built with academic papers or non-Latin scripts as the primary target. MinerU was: it converts mathematical notation to LaTeX instead of garbling it into plain text, reconstructs tables as HTML (which survives merged cells better than a Markdown pipe table), and its layout models are trained on a training set that includes substantial Chinese, Japanese, and Korean content. If your pipeline ingests research papers, patents, or multilingual reports, that specialization shows up directly in output quality. For general contracts, reports, and web-sourced documents, the gap narrows and Docling's speed advantage becomes the more relevant factor.
When to Use Each
Use Docling when:
- You want a lightweight install that runs well on CPU-only infrastructure
- Your documents are typical business PDFs — contracts, reports, invoices
- You're prototyping a RAG pipeline and want fast iteration
- A plain MIT license with no thresholds matters for your legal review
Use MinerU when:
- You're parsing academic papers with dense math notation
- Your document set includes significant Chinese, Japanese, or Korean content
- You need tables preserved as HTML rather than flattened Markdown
- You want an MCP server or built-in WebUI without extra tooling
Both tools solve overlapping problems well enough that many teams benchmark both against their own document set before choosing — see our comparisons of Docling vs pdfplumber, Docling vs MarkItDown, and Docling vs Unstructured for how it stacks up against other parsers.
When Neither Is Enough
Both are actively maintained, capable libraries, but they share the same operational costs:
- Non-Python services — neither exposes a lightweight drop-in for Node, Go, or Ruby without standing up a Python process or calling MinerU's REST API separately
- Model management — MinerU's higher-accuracy tiers download and cache multiple gigabytes of model weights; Docling's layout models add similar overhead
- Mixed batches — a folder of native PDFs, scans, DOCX, and PPTX files still needs per-type handling either way
The file2markdown.ai API converts PDFs, DOCX, XLSX, PPTX, and more to clean Markdown with a single HTTP call, with OCR and table formatting handled server-side — useful as a zero-setup baseline when you're benchmarking Docling or MinerU against something that requires no installation at all.
Frequently Asked Questions
Is MinerU free to use commercially?
Yes, for almost everyone. MinerU's license permits commercial use without a separate agreement unless your product exceeds 100 million monthly active users or USD 20 million in monthly revenue, in which case a commercial license from the MinerU team is required. It also requires attribution if you expose MinerU's output through an online service.
Is MinerU better than Docling for scanned PDFs?
Both include OCR for scanned documents. MinerU's OCR and layout models are tuned for dense academic and multilingual content, so it tends to do better on scanned research papers and CJK-language scans. Docling's OCR is solid for general scanned business documents and runs with a lighter install.
Which tool is faster, Docling or MinerU?
Docling is generally faster and lighter on CPU-only hardware. MinerU offers a fast "Flash" tier for quick results, but its higher-accuracy tiers trade speed for precision and benefit from GPU acceleration.
Can I use Docling or MinerU without writing any Python code?
Not directly — both are Python libraries or CLIs that need installation and, for MinerU's advanced tiers, model downloads. If you want document-to-Markdown conversion without setup, file2markdown.ai provides a free online converter and REST API that need no local installation.
Bottom Line
Pick Docling when you want a fast, MIT-licensed parser for general business documents and CPU-friendly infrastructure. Pick MinerU when your documents are academic, formula-heavy, or written in Chinese, Japanese, or Korean, and you've confirmed its license terms work for your scale. If you'd rather skip both installs, file2markdown.ai converts PDFs to Markdown with OCR included through a free online converter or REST API.
The Markdown Memo
A fortnightly note for lawyers, researchers, accountants, and anyone else drowning in PDFs, scans, and decks. No spam.