# Marker

> Open-source pipeline that converts PDFs, images, and Office docs into clean Markdown, JSON, or HTML fast, with optional LLM assist for tables and equations.

Marker is an open-source Python pipeline from Datalab that converts PDFs, images, PPTX, DOCX, XLSX, HTML, and EPUB into clean Markdown, JSON, or HTML. It runs locally on GPU, CPU, or Apple MPS, preserves tables, equations, and code, and can optionally call an LLM for accuracy-critical pages.

Website: https://www.datalab.to

Marker is an **open-source pipeline from Datalab** that converts documents into clean, structured text. It accepts PDFs, images, PPTX, DOCX, XLSX, HTML, and EPUB and outputs Markdown, JSON, chunks, or HTML, making it a common ingestion step for RAG pipelines and LLM workflows that need readable text out of messy source documents.

Under the hood Marker builds on Datalab's **Surya OCR, layout, and table-recognition models**, so it preserves tables, equations, inline math, links, references, and code blocks while removing page furniture like headers and footers. It is designed to run **locally on GPU, CPU, or Apple MPS**, which keeps documents on your own hardware and makes it predictable for batch conversion at scale.

For accuracy-critical pages, an optional `--use_llm` flag layers a language model on top of the deterministic pipeline to handle harder cases such as merging tables across page boundaries, cleaning inline math, and extracting form values. The flag works with hosted models like Gemini and Claude or a local Ollama model, so you can trade cost for accuracy only where it matters.

The Marker code is licensed under **GPL-3.0**, with model weights under a modified AI Pubs Open Rail-M license that is free for research, personal use, and smaller companies; broader commercial self-hosting requires a license. Datalab also runs a managed API platform built on its newer Chandra OCR model for teams that prefer a hosted, higher-accuracy option over self-hosting.

---

_Source: https://agentscamp.com/tools/marker — Tool on AgentsCamp._
