- Category
- Developer Tools
- Rank
- No. 140Tools index
- Pricing
- Open Source
- Type
- TOOL
- Builder
- datalab-to
- GitHub
- 39.6k stars
- Latest release
- v2.0.0
- Date
About
Convert PDFs to clean Markdown and JSON quickly with high accuracy — handles tables, equations, code blocks, and complex layouts.
What it does
Marker turns varied document files into structured content for downstream search, analysis, or publishing. It chooses between embedded text and visual recognition page by page, repairs isolated bad blocks in fast mode, and can reprocess whole pages when needed. Results can include extracted images and metadata alongside the document content.
Why it's ranked here
Marker combines broad format support with unusually explicit control over cost and quality. Fast, balanced, and text-only paths let operators match processing effort to document condition. The repository also describes evaluation on a third-party PDF benchmark covering scans, math, tables, columns, and difficult edge cases.
What's good
The processing strategy avoids visual inference for clean digital documents when possible. Multiple workers share inference servers instead of loading separate model copies, which reduces per-worker resource use. Operators can force recognition, restrict page ranges, preserve headers and footers, customize processing, or add an LLM for cross-page tables, forms, and math correction.
Tradeoffs
Installation is heavier than a typical text parser. It requires Python 3.10 or newer, PyTorch, and a local inference backend for recognition. NVIDIA setups need Docker and the NVIDIA Container Toolkit, while CPU and Apple Silicon setups need llama.cpp. Non-PDF formats require optional dependencies. Code and model weights also carry different licenses, with added commercial restrictions on the weights.
How to use it well
Use Marker in ingestion pipelines that must retain document structure, images, equations, and layout cues. Start with fast mode for digital files, use balanced mode on a GPU for harder pages, and disable recognition when the text layer is trustworthy. Add an LLM only when forms, inline math, or tables spanning pages justify it. Marker itself is not the managed batch, compliance, or hosted processing service described separately.
Technical notes+
pyproject.toml defines the marker-pdf Python package, a Hatchling build, Python >=3.10,<4, the full optional dependency group, and four console scripts: marker, marker_single, marker_gui, and marker_server. marker/models.py constructs thin Surya clients around shared inference services. marker/builders/line.py selects PDF text or Surya recognition per page and supports block-level repair, while marker/builders/ocr.py rebuilds failed pages from full-page VLM output with block fallback. marker/output.py serializes Markdown, HTML, JSON, chunk, and OCR JSON results, writes metadata, and saves images. marker/settings.py selects CUDA, MPS, or CPU, and marker/utils/batch.py sizes conversion workers around physical cores and inference concurrency.
Observed
- Primary language
- Python
- Code license
- Apache-2.0
- Model license
- Modified AI Pubs Open Rail-M, with commercial restrictions described for organizations beyond the stated funding or revenue threshold
- Install surface
- PyPI package marker-pdf, with a full optional dependency set for non-PDF formats
- Interfaces
- Batch CLI, single-file CLI, Streamlit GUI, server entry point, and importable Python package
- Platform support
- GPU, CPU, and Apple MPS; inference uses vLLM on NVIDIA or llama.cpp on CPU and Apple Silicon
- Input formats
- PDF, images, PPTX, DOCX, XLSX, HTML, and EPUB
- Output formats
- Markdown, JSON, chunks, and HTML, with extracted images and metadata
Read from README.md, pyproject.toml, convert.py, marker_app.py, marker_server.py, convert_single.py, marker/util.py, marker/logger.py, marker/models.py, marker/output.py, marker/settings.py, marker/utils/batch.py, marker/utils/image.py, marker/builders/ocr.py, marker/builders/line.py.
What it can do
Convert PDF to Markdown
PDF file → Markdown text
Convert PDF to JSON
PDF file → JSON data
Extract tables from PDF
PDF file with tables → Structured table data
Parse mathematical equations from PDF
PDF file with equations → Formatted equation text
Extract code blocks from PDF
PDF file with code → Formatted code text
Process complex PDF layouts
PDF file with complex formatting → Clean structured text
Tags
Tech Stack
Comments (0)
No comments yet
Editorially curated, with community endorsements as a secondary signal. Corrections welcome.
