Skip to content
FossShelf
Home / Categories / For AI Engineers

Marker

Convert documents to clean markdown and JSON with open source AI.

Replaces Unstructured Io, Llamaparse, Reducto

40.94K starsApache-2.0reviewed 15 Oct 2026last commit 14 Nov 2026

Who it's for

Data engineers building RAG pipelines

Marker converts documents to clean markdown or typed JSON blocks that feed directly into embedding models without HTML noise. Block metadata lets you split on section boundaries rather than arbitrary character counts. Batch mode processes entire folder hierarchies with configurable worker counts and multi-GPU support.

Your documents are already in clean text or HTML. Marker's value is parsing unstructured formats like PDFs and scanned images; if your content is already structured, a lighter chunking library handles it with less overhead.

AI researchers processing academic paper corpora

Balanced mode handles multi-column arXiv PDFs, embeds equations as LaTeX, and preserves table structure. The --page_range flag targets specific sections. Multi-GPU batch processing converts thousands of papers on a single machine, producing citation-ready markdown for training data pipelines.

You only need metadata (authors, abstracts, references) rather than full-text conversion. Dedicated bibliography parsers handle structured metadata extraction with less overhead.

Teams with data residency or confidentiality requirements

Regulated industries where documents cannot be sent to third-party APIs can run Marker fully air-gapped. Models download once; after that, no internet connection is required. Datalab also offers VPC and on-premises managed deployments for teams that want managed infrastructure without data leaving their network.

Your documents are not confidential and volume is modest. A managed API like LlamaParse is simpler to operate for teams without data residency constraints.

Financial and insurance document workflows

TableConverter extracts structured data from claim forms, financial statements, and regulatory filings. Word-level bounding boxes in the JSON output trace each value back to its position in the source document. The --use_llm flag improves accuracy on complex form layouts that the base model handles inconsistently.

Your documents are primarily narrative text without tables or structured forms. The full extraction pipeline adds setup complexity that only pays off on structured document content.

The problem

Extracting clean, structured text from real documents is harder than it looks. PDFs mix vector text, raster images, and metadata in a format designed for display, not parsing. Tables fragment across pages. Equations render as images. Scanned pages have no text layer. Multi-column academic papers collapse into wrong reading order when text is extracted directly. Most teams reach for managed parsing APIs to avoid this complexity. LlamaParse, Unstructured.io, and Reducto handle the hard cases server-side, but every page you parse flows through their infrastructure. Per-page pricing adds up fast for high-volume workloads: a research lab processing tens of thousands of arXiv papers, or a financial team parsing annual reports at scale, quickly hits costs that make a self-hosted path worth the setup effort. And for teams with strict data residency or confidentiality requirements, sending documents to a third-party API is not an option.

How it works

Multi-format document ingestion

Converts PDFs, images, PPTX, DOCX, XLSX, HTML, and EPUB in all languages. The base pip package handles PDFs and images; installing marker-pdf[full] adds Office and EPUB support. All formats share the same output pipeline: markdown, JSON, HTML, or chunks.

Balanced and fast processing modes

Balanced mode uses the surya VLM for layout detection, OCRs inline math, and re-OCRs whole pages when embedded text is bad; it scores 76.0% on olmocr-bench overall and 83.5% on born-digital PDFs. Fast mode uses a lightweight rf-detr layout detector and avoids VLM calls on clean digital documents, suited for CPU-only servers or large-scale batch jobs.

LLM-assisted hybrid mode

Pass --use_llm to improve accuracy on tables that span multiple pages, inline math, form extraction, and custom output formatting. Works with Gemini, Claude, OpenAI-compatible endpoints, Azure, Vertex, OpenRouter, or Ollama, so you choose the LLM backend.

Typed block JSON output with bounding boxes

JSON output is a tree of typed blocks (paragraphs, tables, equations, figures, forms) with page bounding boxes and word-level coordinates. This lets you extract specific block types programmatically, such as all tables or all forms, using the Python API's contained_blocks() method.

Extensible Python API

The PdfConverter class accepts custom processor lists, renderers, and LLM services via ConfigParser. TableConverter extracts only tables; OCRConverter runs OCR only. Custom processors can manipulate the internal block tree between pipeline stages, enabling domain-specific extraction logic without forking the core library.

Multi-GPU and multi-node batch processing

Run marker on a folder to process thousands of files in parallel. VLLM_GPUS=0,1,2,3 spans multiple GPUs on one machine; --num_chunks and --chunk_idx shard workloads across multiple nodes. The parent process budgets VLM concurrency automatically against the inference server's capacity.

Features

  • Multi-format document ingestion
  • Balanced and fast processing modes
  • LLM-assisted hybrid mode
  • Typed block JSON output with bounding boxes
  • Extensible Python API
  • Multi-GPU and multi-node batch processing

How to install

Install with pip; the [full] extra adds support for Office files and EPUB documents.

pip install marker-pdf
pip install marker-pdf[full]

Recommended for this setup

Strengths

  • Apache-2.0 code license with no per-page cost: The code is Apache-2.0, free to use commercially with no per-page parsing fees. Unlike LlamaParse or Unstructured.io's managed APIs, a self-hosted Marker deployment has a fixed monthly infrastructure cost regardless of document volume. High-volume workloads become structurally cheaper once the server is in place.
  • Benchmark accuracy ahead of comparable open source tools: Balanced mode scores 76.0% overall on olmocr-bench and 83.5% on born-digital PDFs, ahead of MinerU and docling on the same third-party benchmark. The suite covers 1,403 PDFs across math, tables, multi-column layout, scanned documents, and other hard edge cases.
  • Full infrastructure control and data residency: Document content never leaves your network. For regulated industries (healthcare, finance, legal) where sending documents to a third-party processor creates compliance obligations, self-hosting removes that relationship. Models download once and run air-gapped on isolated networks with no ongoing internet requirement.
  • Flexible LLM backend integration: The --use_llm flag integrates with any OpenAI-compatible endpoint, Gemini, Claude, Azure, Vertex, OpenRouter, or a local Ollama instance. If you already run a local model server, Marker can use it for hybrid-mode accuracy boosts without adding a cloud API dependency.

Trade-offs

  • Model weight license restricts commercial use above the startup threshold: The code is Apache-2.0, but the model weights use a modified OpenRAIL-M license. Research, personal use, and startups under $5M in funding or revenue can use the weights freely. Teams running Marker for their own organization's internal documents are permitted; teams offering Marker-powered parsing as a paid service to external customers need a commercial license from Datalab.
  • GPU or local inference server required for highest accuracy: Balanced mode requires Docker with an NVIDIA GPU (for vLLM) or a llama.cpp binary (for CPU and Apple Silicon). Without the inference server configured, Marker falls back to fast mode, which skips VLM calls on clean digital documents and cannot OCR scanned pages. Setup is more involved than a managed API and needs ongoing infrastructure maintenance.
  • Large open issue count reflects edge cases in the wild: The repository has 485 open issues against 40k+ stars. Edge cases in heavily scanned documents, complex table layouts, and some equation types appear in the tracker. Development is active (last push October 2026), but testing against your own document corpus before production deployment is advisable.

Tech stack

Languages
Python, Shell
Frameworks
—
Databases
—
Tooling
—

FAQ

Is Marker free to use?

The code is Apache-2.0 and free for personal, research, and commercial use. The model weights use a modified OpenRAIL-M license: free for research, personal use, and startups under $5M in funding or revenue. Commercial use of the weights beyond that threshold requires a license from Datalab. Self-hosters processing their own organization's documents fall under the free tier in most cases.

What file formats does Marker support?

The base install (pip install marker-pdf) handles PDFs and images. Installing marker-pdf[full] adds PPTX, DOCX, XLSX, HTML, and EPUB support. OCR covers 90+ languages via the surya multilingual model.

Does Marker require a GPU?

No. GPU gives the highest accuracy in balanced mode (NVIDIA, via Docker and vLLM). CPU and Apple Silicon work via llama.cpp. On CPU, Marker defaults to fast mode, which skips VLM calls on clean digital PDFs. Scanned documents need the VLM for OCR regardless of mode, so a GPU or llama.cpp setup is required to process scanned-only files.

How does Marker compare to LlamaParse?

LlamaParse is a managed API with no self-hosting option; Marker runs on your own infrastructure. LlamaParse is simpler to start: no GPU, no server setup, no Python environment to manage. Marker eliminates per-page fees and keeps document content on your network. On complex scanned documents, LlamaParse's proprietary models may outperform Marker's open source weights for teams without dedicated GPU infrastructure.

Can I use Marker from Python?

Yes. The PdfConverter class is the main entry point. Pass custom configuration, processors, and LLM services via ConfigParser. TableConverter handles table-only extraction; OCRConverter handles OCR-only tasks. JSON output gives you a typed block tree with bounding boxes, suitable for programmatic extraction of specific content types like tables or forms.

Similar tools

More in AI Engineers