skillfed

marker-pdf

Convert documents to markdown with high speed and accuracy.

marker-pdf v2.0.0 551.3K downloads/30d#6,050 on PyPI38,743
Permissive license Apache-2.0 Active released

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-pdf

uv

uv add marker-pdf

poetry

poetry add marker-pdf

Installing 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

pdf to markdown conversiondocument ocr and extractionpdf layout analysistable extraction from pdfdocument intelligencepdf text extractionmultiformat document parsing
document-intelligenceocrlayout-analysis

More Markup packages