Master Marker with our step-by-step tutorial, detailed feature walkthrough, and expert tips.
Install Marker with pip: pip install marker
pdf (add [full] for non
PDF format support) Ensure Python
10+ and PyTorch are installed (GPU recommended for batch processing) Convert a single PDF: marker_single input.pdf
output_dir ./output For higher accuracy on complex documents, add
use_llm flag with Gemini or Ollama For production workloads, consider the managed API at datalab.to for hands
off processing
💡 Quick Start: Follow these 7 steps in order to get up and running with Marker quickly.
Explore the key features that make Marker powerful for document ai workflows.
Uses Surya models for detecting document regions: text blocks, headers, tables, figures, equations, code blocks, page headers, and footers. Handles multi-column layouts and complex page structures with reading order detection.
Converting a two-column research paper into single-column markdown with correct reading order and section hierarchy.
Integrated Surya OCR engine optimized for document text recognition. Supports 90+ languages and handles mixed-language documents with higher accuracy than Tesseract for most document types.
Processing scanned technical documents in multiple languages where Tesseract OCR produces too many errors.
Detects tables and converts them to properly formatted markdown tables or structured JSON with column alignment. Handles simple and moderately complex table structures, with LLM-enhanced mode for merging tables across pages.
Converting a technical specification PDF with comparison tables into structured data where table relationships are preserved.
Optional --use_llm flag pairs Marker with Gemini, Claude, OpenAI, or Ollama models to improve table formatting, handle inline math, extract form values, and merge tables split across pages. Benchmarks in the README report higher accuracy when LLM assistance is enabled for relevant cases.
Processing complex financial reports where tables span multiple pages and inline calculations need accurate LaTeX conversion.
Accepts PDF, image, PPTX, DOCX, XLSX, HTML, and EPUB files. Outputs markdown, JSON (structured), chunks (pre-segmented for RAG), or HTML. Extensible with custom processors for specialized formatting logic.
Building an ingestion pipeline that converts a mix of PowerPoint presentations, Word documents, and PDFs into chunked JSON for a vector database.
Datalab offers a hosted managed API with published page-based pricing and custom self-hosted deployments for teams that do not want to operate the open-source stack directly. Published managed pricing lists $4 per 1,000 pages for Fast and Balanced mode and $6 per 1,000 pages for High Accuracy mode, structured extraction, track changes, and spreadsheets.
A compliance team that processes thousands of regulatory PDFs monthly using the managed API or a commercial self-hosted deployment to avoid maintaining a custom document conversion service.
Marker supports PDF, image, PPTX, DOCX, XLSX, HTML, and EPUB files. The README notes that non-PDF document support requires installing additional dependencies with marker-pdf[full].
Marker can output markdown, HTML, JSON, and chunks. Markdown includes image links, formatted tables, LaTeX equations, fenced code blocks, and footnote superscripts; JSON exposes a tree-like block structure; chunks flatten top-level blocks for easier RAG indexing.
LLM use is optional. With --use_llm, Marker can improve accuracy for cases such as table merging across pages, inline math, table formatting, and extracting values from forms. The README lists Gemini, Google Vertex, Ollama, Claude, OpenAI-compatible endpoints, and Azure OpenAI as supported LLM services.
Yes. Marker can run locally through CLI commands such as marker_single and marker, through Python APIs, through a Streamlit GUI, or through a lightweight FastAPI server. It can run on GPU, CPU, or Apple MPS, with Torch device detection and override options.
Not for all commercial situations. The repository states that the code is GPL-3.0 and the model weights use a modified AI Pubs Open Rail-M license that is free for research, personal use, and startups under $2M funding or revenue. Broader commercial licensing or removing GPL requirements requires Datalab’s commercial licensing.
Now that you know how to use Marker, it's time to put this knowledge into practice.
Sign up and follow the tutorial steps
Check pros, cons, and user feedback
See how it stacks against alternatives
Follow our tutorial and master this powerful document ai tool in minutes.
Tutorial updated March 2026