datalab-to/marker

Convert PDF to markdown + JSON quickly with high accuracy

What it solves

Marker solves the problem of converting complex documents—such as PDFs, images, and office files—into clean, structured formats like Markdown, JSON, and HTML. It is designed to handle difficult elements like tables, mathematical equations, code blocks, and multi-column layouts while removing unwanted artifacts like headers and footers.

How it works

Marker uses a hybrid approach that balances speed and accuracy. It can run entirely on a CPU for fast, local processing or leverage GPU-accelerated vision models (VLMs) for high-precision tasks like reading scanned pages, complex tables, or handwriting. It offers multiple modes: a 'fast' mode for quick text extraction, a 'balanced' mode that intelligently routes complex pages to a vision model, and a 'vllm' mode for maximum accuracy. You can also optionally integrate an LLM to further refine the output, such as merging tables across pages or formatting complex forms.

Who it’s for

It is for developers and data engineers who need to convert large volumes of documents into machine-readable formats for AI agents, RAG pipelines, or data analysis. It is suitable for users ranging from those needing lightweight, CPU-only tools for laptops to those requiring high-throughput, GPU-accelerated batch processing for millions of pages.

Highlights

  • Supports diverse file types including PDF, image, PPTX, DOCX, XLSX, HTML, and EPUB.
  • Provides high-performance conversion with modes optimized for both CPU and GPU hardware.
  • Automatically extracts and saves images while cleaning up document artifacts.
  • Includes an interactive web viewer to inspect layout blocks and conversion results.
  • Extensible architecture allows for custom formatting, logic, and LLM-based corrections.
  • Multilingual support for documents in any language.

Related

  • Project
  • Project
  • Project
  • Project
  • Project