marker-pdf
Convert documents to markdown with high speed and accuracy.
What it is and what it does
Marker is a document-to-markdown converter built on vision language models that handles PDFs, images, and office documents across all languages. It reconstructs layout, tables, equations, and inline math, removes headers and footers, and extracts images—all with optional LLM post-processing for higher accuracy. The package runs in balanced mode (GPU-optimized, full-page OCR) or fast mode (CPU-optimized, minimal VLM calls), and can disable OCR entirely for pure text-layer extraction.
The package depends on a large stack: torch, transformers, surya-ocr, anthropic, google-genai, openai, and others. It spawns a local inference server automatically (vLLM on NVIDIA GPUs, llama.cpp elsewhere) unless you point it at an existing one. Installation requires Python 3.10+; the full extras install adds support for non-PDF formats.
Use it for:
- Convert academic papers or textbooks to searchable markdown while preserving tables, equations, and multi-column layout.
- Extract structured data (tables, forms, values) from scanned or digital PDFs using optional LLM refinement.
- Batch-process large document collections to markdown for indexing, RAG pipelines, or downstream NLP tasks.
- Convert presentations (PPTX) and spreadsheets (XLSX) to markdown or JSON for archival or content migration.
- Build a document ingestion pipeline that handles mixed formats (PDF, image, DOCX, EPUB) in a single workflow.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Marker converts PDFs, images, and other document formats (PPTX, DOCX, XLSX, HTML, EPUB) to markdown, JSON, HTML, or chunks with layout-aware OCR and table reconstruction.
Yes, with conditions. Marker is actively maintained, well-starred, and solves a real problem—document-to-markdown conversion at scale with layout awareness. The Apache 2.0 license is permissive for code. However, the 21 runtime dependencies (especially torch and transformers) create significant installation and memory overhead. The model weights carry a commercial license restriction for companies over $5M revenue. Install if you need production-grade document parsing; skip if you need lightweight PDF text extraction.
Install
marker-pdf on PyPI
pip
pip install marker-pdfuv
uv add marker-pdfpoetry
poetry add marker-pdfInstalling marker-pdf
Before you install
Low friction: pure Python wheel. Active maintenance—last commit 2026-08-07, 38743 stars. However, 21 runtime dependencies including torch, transformers, and surya-ocr add significant disk and memory overhead.
License in practice
Apache 2.0 permissive license allows free commercial use of the code. Model weights use a modified AI Pubs Open Rail-M license (free for research and startups under $5M funding/revenue); commercial use beyond that threshold requires a license.
Quickstart
pip install marker-pdf
from marker.converters.pdf import PdfConverter
from marker.models import create_model_dict
model_dict = create_model_dict()
converter = PdfConverter(model_dict=model_dict)
result = converter("/path/to/document.pdf")
print(result.markdown)
Python 3.10+ required. For non-PDF formats, install marker-pdf[full]. Local inference server (vLLM or llama.cpp) spawns automatically; GPU recommended for balanced mode.
Verify before relying
- Whether the local inference server (vLLM or llama.cpp) spawning is reliable across different system configurations.
- Performance characteristics on CPU-only systems, since balanced mode defaults to GPU.
- Whether the LLM integration (Gemini, Claude, OpenAI, etc.) incurs API costs by default or if a free tier is available.
- Actual memory and disk footprint of the 21 runtime dependencies in a typical installation.
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (<4,>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 21 — anthropic, click, filetype, ftfy, google-genai, markdown2, markdownify, openai, pdftext, pillow, psutil, pydantic-settings, pydantic, python-dotenv, rapidfuzz, regex, scikit-learn, surya-ocr, torch, tqdm, transformers |
| Maintenance | actively maintained — 25 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 551,298/month — #6,050 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: marker_pdf-2.0.0-py3-none-any.whl
Keywords: markdown, nlp, ocr, pdf
Tags
More Markup packages
PyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
markdown-it-pyA Python markdown parser that converts markdown…
permissive · top 100 on PyPI
beautifulsoup4Beautiful Soup parses HTML and XML documents…
permissive · top 100 on PyPI
et-xmlfileet_xmlfile writes large XML files with minimal…
permissive · top 1,000 on PyPI
tomlkitParses and edits TOML files while preserving…
permissive · top 1,000 on PyPI
docstring-parserParses Python docstrings in ReST, Google,…
permissive · top 1,000 on PyPI
datalab-python-sdkA Python SDK for calling the Datalab API to…
permissive · top 15,000 on PyPI
mineruConverts PDF, DOCX, PPTX, XLSX, images, and web…
unclear · top 15,000 on PyPI
surya-ocrSurya is an OCR and document intelligence model…
permissive · top 5,000 on PyPI
landingai-adeConverts PDFs and images into structured…
permissive · top 15,000 on PyPI
opendataloader-pdfExtracts structured data (Markdown, JSON, HTML)…
permissive · top 15,000 on PyPI
doclingDocling parses diverse document formats—PDF,…
permissive · top 5,000 on PyPI
paddleocrPaddleOCR extracts text, tables, and structured…
permissive · top 5,000 on PyPI
docling-ibm-modelsProvides AI models for table structure…
permissive · top 5,000 on PyPI
pdf-oxideExtracts text, images, and metadata from PDFs…
permissive · top 15,000 on PyPI
ocrmypdfOCRmyPDF adds searchable text layers to scanned…
copyleft · top 5,000 on PyPI