Marker vs MinerU: Which Open-Source PDF Parser Should You Use for RAG?
Marker vs MinerU: Which Open-Source PDF Parser Should You Use for RAG?
Marker and MinerU are two of the most widely used open-source tools for turning PDFs into clean Markdown for AI pipelines. Marker comes from Datalab (the team behind the Surya OCR models) and is built for speed and broad document support. MinerU comes from OpenDataLab at Shanghai AI Lab and is built as a full document-parsing platform — OCR, layout, tables, formulas, and now a local document library for agent workflows. Both show up constantly in RAG and document-parsing threads, and both already get compared against Docling in our Docling vs Marker and Docling vs MinerU posts. This one puts them head-to-head directly.
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 Marker when you want fast, broad-format conversion (PDF, Office, HTML, EPUB, images) with a lightweight CLI and a REST API you can stand up yourself.
Use MinerU when you need a document-parsing platform — four selectable quality tiers, a local document library with search and page/block citations, and the widest input format list of the two (RTF, ODT/ODS/ODP, OFD, MHTML, CSV/TSV in addition to the usual PDF/Office set).
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
Marker (marker-pdf on PyPI, ~40,000 GitHub stars) converts PDFs, images, PPTX, DOCX, XLSX, HTML, and EPUB files into Markdown, JSON, HTML, or chunks. It uses Datalab's Surya models for OCR and layout, reconstructs tables from the PDF's text layer, and recognizes equations and inline math via a vision-language model. It runs on CPU or Apple Silicon in its fast mode, or with GPU acceleration for its more accurate balanced mode.
MinerU (mineru on PyPI, version 4.0, ~80,600 GitHub stars) is built around four parsing tiers — Flash, Basic, Standard, and Advanced — that trade speed for accuracy on PDFs and images. As of version 4.0 it's less a single CLI tool and more a small platform: a local document library (DoclibClient) that caches parsed results, supports search, and returns stable doc:.../page:.../block:... locators for citations, plus a Python SDK, a stateless batch CLI, and a Gradio WebUI. Beyond PDFs and images it also parses DOC/DOCX, PPT/PPTX, XLS/XLSX, RTF, ODT/ODS/ODP, EPUB, OFD, HTML/MHTML, and CSV/TSV — though only PDFs and images get all four quality tiers; the rest are parsed locally at the Flash tier.
Head-to-Head Comparison
| Marker | MinerU | |
|---|---|---|
| Maintainer | Datalab | OpenDataLab (Shanghai AI Lab) |
| GitHub stars | ~40,000 | ~80,600 |
| PyPI package | marker-pdf (v2.0.0) | mineru (v4.0.7) |
| Core strength | Speed, broad format support, simple CLI | Quality tiers, local doc library, agent-oriented citations |
| Input formats | PDF, images, PPTX, DOCX, XLSX, HTML, EPUB | PDF, images, DOC/DOCX, PPT/PPTX, XLS/XLSX, RTF, ODT/ODS/ODP, EPUB, OFD, HTML/MHTML, CSV/TSV |
| Output formats | Markdown, JSON, HTML, chunks | Markdown, HTML, LaTeX, DOCX, EPUB, PDF, structured content lists |
| Formula handling | Recognized and converted to LaTeX by the VLM | Formula recognition across OCR-capable tiers |
| Hardware | CPU/Apple Silicon (fast mode); GPU for balanced mode | ONNX CPU + llama.cpp by default; NVIDIA GPU (mineru[full]) for best throughput |
| Code license | Apache 2.0 | Apache 2.0 + additional terms ("MinerU Open Source License") |
| Model license | Modified OpenRAIL-M, with a revenue/funding threshold | Same Apache-based license as the code, with a usage threshold |
| Interfaces | CLI, REST API server | CLI, Python SDK, stateless batch, Gradio WebUI |
Installing and Using Each
Marker
pip install marker-pdf
marker_single /path/to/file.pdf --output_format markdown
Add pip install marker-pdf[full] if you need to convert non-PDF formats like DOCX or PPTX. A local REST API is available with marker_server --port 8001.
MinerU
pip install uv
uv pip install -U "mineru>=4.0,<5"
mineru-kit parse document.pdf -o document.md --tier standard
MinerU's default install runs ONNX CPU inference with llama.cpp for the vision-language model, which works on most machines without a GPU. If you have an NVIDIA GPU, pip install "mineru[full]>=4.0" gets you better throughput.
Licensing: The Detail Both Tools Bury
This is where the two diverge in a way that actually matters for a commercial product. Both are Apache 2.0 at the code level, but both attach usage-based terms on top of it — at very different thresholds.
Marker's model weights ship under a modified OpenRAIL-M license: free for research, personal use, and startups under $5 million in funding or revenue. Cross that line and you need a commercial license from Datalab's pricing page — a threshold a growing startup can hit well before it has enterprise-scale usage.
MinerU stays fully free for commercial use unless your product exceeds 100 million monthly active users or USD 20 million in monthly revenue, at which point a separate commercial license is required from the MinerU team. It also requires that you clearly attribute MinerU if you expose its output through an online service. (Verified directly against MinerU's LICENSE.md and Marker's README on 2026-09-25.)
In practice: MinerU's threshold is high enough that almost no company hits it before a major funding round of its own. Marker's $5M funding-or-revenue line is a threshold a well-funded seed-stage startup can cross without much fanfare — read the model license before you build a product around Marker's default weights.
When to Use Each
Use Marker when:
- You want a simple
pip installand a single CLI command for PDF-heavy pipelines - Your document set is mostly PDFs, with occasional Office or HTML files
- You're comfortable checking your funding/revenue against Marker's model-license threshold
- You want a REST API you can run yourself without extra infrastructure
Use MinerU when:
- Your input mix includes RTF, OpenDocument, OFD, or MHTML files alongside PDFs
- You want built-in page/block citations and a searchable local document library for agent workflows
- You need selectable quality tiers to trade speed for accuracy per document
- A higher commercial-use threshold (100M MAU / $20M monthly revenue) matters more to you than Marker's
Both tools solve overlapping problems well enough that many teams benchmark both against their own documents — see our comparisons of Marker vs Docling, Docling vs MinerU, and Docling vs MarkItDown for how the third major open-source parser stacks up against each.
When Neither Is Enough
Both are actively maintained and capable, but they share the same operational costs:
- Non-Python services — neither exposes a lightweight drop-in for Node, Go, or Ruby without running a Python process or calling a self-hosted REST API
- Model management — Marker's balanced mode and MinerU's higher tiers both download and cache multi-gigabyte model weights
- License review — a legal or finance check before shipping a commercial product is worth the hour, given how different the two thresholds are
The file2markdown.ai API converts PDFs, DOCX, XLSX, PPTX, and more to clean Markdown with a single HTTP call, OCR and table formatting handled server-side — useful as a zero-setup baseline when you're benchmarking Marker or MinerU against something that needs no installation or license review at all. For a broader look at prepping PDFs for retrieval, see our guide to RAG document prep from PDF to Markdown to chunks.
Frequently Asked Questions
Is Marker or MinerU free to use commercially?
Both allow commercial use by default. Marker's code is Apache 2.0, but its default model weights are free only for research, personal use, and startups under $5 million in funding or revenue — beyond that, Datalab requires a commercial license. MinerU stays free commercially unless you exceed 100 million monthly active users or $20 million in monthly revenue, at which point you need a license from the MinerU team.
Which tool supports more file formats?
MinerU supports more input formats out of the box — PDF, images, Office formats, RTF, OpenDocument (ODT/ODS/ODP), OFD, HTML/MHTML, and CSV/TSV. Marker covers PDF, images, PPTX, DOCX, XLSX, HTML, and EPUB. Note that MinerU only applies its higher-accuracy tiers to PDFs and images; other formats are parsed locally at its fastest tier.
Do Marker and MinerU need a GPU?
Neither strictly requires one. Marker's fast mode and MinerU's default install both run on CPU (MinerU uses ONNX plus llama.cpp for its vision-language model). A GPU speeds up Marker's balanced mode and MinerU's higher-accuracy tiers, and MinerU recommends installing its [full] extra if you have an NVIDIA GPU.
Can I use Marker or MinerU without installing anything?
Not directly — both are Python packages that need installation and, for their most accurate modes, model downloads. If you want document-to-Markdown conversion with no setup, file2markdown.ai provides a free online converter and REST API that need no local installation.
Bottom Line
Pick Marker for a fast, simple CLI covering PDFs plus the common Office and web formats — just check its $5M model-license threshold against your company's stage. Pick MinerU when your input mix is broader (RTF, OpenDocument, OFD, MHTML) or you want a searchable local document library with citation locators for agent workflows, and its much higher commercial-use threshold gives you more room to grow. If you'd rather skip both installs and license reviews, file2markdown.ai converts documents 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.