opensourceprojects.dev

A broadsheet for software that doesn't ask for your email

Marker converts PDFs, PPTX, and DOCX to markdown with 76% on olmocr-bench
GitHub RepoImpressions3

Project Description

View on GitHub

Stop Copy-Pasting From PDFs: Marker Turns Documents Into Clean Markdown

You know the drill — you've got a PDF full of tables, equations, and multi-column layouts, and you need that content in a format you can actually work with. Copy-paste gives you garbled text, broken formatting, and images that vanish into the void. Marker is an open-source tool that converts PDFs, PPTX, DOCX, and other document formats into clean markdown, JSON, chunks, and HTML — fast and accurately. It's the document-to-text pipeline you've been wanting.

What It Does

Marker is a document conversion library that takes a wide range of file types — PDF, images, PPTX, DOCX, XLSX, HTML, and EPUB — and turns them into structured markdown. It handles formatting across tables, forms, equations, inline math, links, references, and code blocks. It also extracts and saves images separately, and it cleans up headers, footers, and other page artifacts that usually clutter converted output.

The project is built to be extensible. You can add your own formatting logic on top of the default pipeline, and you can optionally boost accuracy by passing a --use_llm flag, which uses an LLM alongside Marker to handle tricky cases like merging tables across pages, formatting inline math, and extracting values from forms. It works with Gemini, Claude, OpenAI-compatible APIs, Azure, Vertex, OpenRouter, and Ollama — so you can plug in whatever model you're already using.

Performance-wise, Marker scores 76.0% overall on the olmocr-bench benchmark (1,403 PDFs covering math, tables, multi-column layouts, scans, and edge cases). That jumps to 83.5% on born-digital PDFs. It beats MinerU and docling on that benchmark and lands within range of much larger VLMs — but runs far cheaper, especially in fast mode, which uses the layout + text-layer path without OCR.

Why It's Cool

Here's what makes Marker genuinely useful rather than just another converter:

  • It's fast and flexible on hardware. You can run it on GPU, CPU, or MPS. That means it works on your laptop, your workstation, or a cloud instance — no special hardware required.

  • The LLM hybrid mode is a clever design choice. Instead of baking AI into every step (slow and expensive), Marker uses traditional layout analysis by default and only calls an LLM when you opt in. That gives you a fast, cheap baseline and an accuracy boost exactly when you need it.

  • It handles the messy stuff. Tables, forms, equations, inline math, references, code blocks — these are the things that break naive converters. Marker specifically targets them, and the benchmark results back it up.

  • Extensible by design. You're not locked into a fixed output format. The README says you can extend it with your own formatting and logic, which is huge if you have specific output requirements for your project.

  • The benchmark numbers are honest and public. They're measured on a third-party benchmark (olmocr-bench from AllenAI), not a self-selected dataset. That's a good sign for trustworthiness — and they show the per-category scores and competitive comparison so you can judge for yourself.

There's also a managed platform (Datalab) that runs a newer model called Chandra with higher accuracy and zero data retention by default, plus a batch service that processes over a billion pages per week. But the open-source version is fully functional on its own — the managed platform is an option, not a requirement.

How to Try It

Getting started with Marker is straightforward. Head over to the GitHub repository to grab the code and full installation instructions.

The basic usage pattern is a CLI command. You point it at your document and it produces markdown (or JSON, chunks, or HTML). If you want the LLM boost, add the --use_llm flag:

# Basic conversion
marker your_document.pdf

# High-accuracy mode with LLM assistance
marker your_document.pdf --use_llm

The default LLM is gemini-3.5-flash, but you can configure it to work with any of the supported providers — Claude, OpenAI-compatible endpoints, Azure, Vertex, OpenRouter, or Ollama. You can also specify the output format you want, whether that's markdown, JSON, chunks for RAG pipelines, or HTML.

The repo includes example outputs so you can see what the conversion looks like before you even install anything. There's a public playground at datalab.to if you want to test it on your own documents without setting up a local environment.

Final Thoughts

Marker is a solid answer to a genuinely annoying problem. If you work with documents — whether you're building RAG pipelines, migrating legacy files, or just need clean markdown from a messy PDF — it's worth trying. The hybrid approach of traditional layout analysis with optional LLM refinement is pragmatic, and the benchmark results give you real numbers to evaluate against. It won't be perfect on every document (no converter is), but it's fast, flexible, and open source. Start with the fast mode, see how it handles your files, and dial up the accuracy options when you need them.


Follow @githubprojects for more developer tools and open source projects.

Back to Projects
Project ID: c22218d0-1401-4620-978e-01492e91d9a3Last updated: August 19, 2026 at 02:45 AM