Skip to content

Best PicksCPU

Best PDF-to-Markdown Tools for Local RAG in 2026

Local RAG is only as good as the text you feed it. We pick the best free, open-source tools for turning PDFs into clean Markdown on your own PC, from Docling and Marker to MinerU and olmOCR, with licences and the hardware each developer says you need.

By , Buying Guides & Peripherals Editor

5 min read

Best PDF-to-Markdown Tools for Local RAG in 2026

If you want a local AI to answer questions from your own documents, the step most people skip is the one that matters most: turning PDFs into clean text. A basic text dump scrambles multi-column pages, flattens tables and ignores scanned pages, and no embedding model or LLM can fix that afterwards. These free, open-source document converters run on your own PC and produce Markdown or JSON that local RAG tools handle well. Our picks are based on each project's official GitHub README and documentation, including the hardware each one asks for. Any benchmark figures mentioned are credited to the developer that published them.

Quick picks

Pick

Best for

Licence

Runs on CPU?

GPU needs (developer's figures)

Docling

Most people; widest range of formats

MIT (models have their own licences)

Yes

Optional

Marker

Hard PDFs with maths, tables and scans

Apache 2.0 code; modified Open Rail-M weights

Yes (fast and no_ocr modes)

Optional; GPU modes use vLLM or llama.cpp

MinerU

Tiered quality, local document library

MinerU Open Source License (Apache 2.0 with extra conditions)

Yes (ONNX engines)

8GB+ VRAM with PyTorch engines

olmOCR

Scans and handwriting with a big GPU

Apache 2.0

No (local use needs a GPU)

Nvidia GPU with at least 12GB

1. Docling: best for most people

Docling was started by IBM Research Zurich and is now hosted by the LF AI & Data Foundation. Its README lists layout, reading order, table structure, code and formulas among the things it understands in PDFs, with OCR for scans and an optional vision-model pipeline using IBM's GraniteDocling. It reads far more than PDFs: Office files, OpenDocument, EPUB, Apple iWork files, HTML, LaTeX, images, and even audio and video, which it transcribes.

What makes it our first pick for local RAG is how well it fits into other tools. It exports Markdown, JSON and ready-made chunks, has integrations with LangChain, LlamaIndex and Haystack, and Open WebUI lists it as a built-in document extraction engine. It installs with pip install docling, needs Python 3.10 or newer, and works on Windows, macOS and Linux with or without a GPU. The MIT licence covers the code; check the licences of the models it downloads if you're using it for business.

Our guide to converting PDFs to Markdown with Docling walks through installation and the most useful options.

2. Marker: best for difficult PDFs

Datalab's Marker converts PDFs, images and Office files to Markdown, JSON, HTML or chunks, and its README highlights formatting of tables, forms, equations, inline maths and code, plus removal of headers and footers. It has four modes, from a CPU-only no_ocr mode that relies on the PDF's own text to a vllm mode that runs Datalab's Surya 2.5 vision model on every page. The default on a GPU, balanced, keeps simple pages on the CPU and only sends hard pages to the vision model.

Datalab's own benchmarks in the README put Marker ahead of Docling, MinerU and several open vision models on both speed and accuracy; those are a developer's results for its own product, so test it on your documents. Two catches: the GPU modes run their vision model through a local server, which on Nvidia cards means Docker with the Nvidia Container Toolkit, and the model weights use a modified AI Pubs Open Rail-M licence that is free for research, personal use and startups under $5M in funding or revenue, with paid licensing beyond that. Our Docling vs Marker comparison goes into more detail.

3. MinerU: best for choosing your own speed/quality trade-off

MinerU, from the OpenDataLab project, parses PDFs, scanned images, Word, PowerPoint and Excel files, EPUB, HTML and more. Version 4 introduced four quality tiers: flash for fast previews and indexing, basic for lower-resource local parsing, standard as the default for normal and complex documents, and advanced for the hardest documents, which is also the slowest.

The README is unusually clear about hardware. The basic tier with ONNX models is a download of about 0.8GB and needs 2GB of RAM with no accelerator; the standard and advanced tiers need 8GB of RAM with ONNX and llama.cpp (CPU works, Vulkan recommended), or 16GB of RAM and a GPU with 8GB or more of VRAM with the PyTorch engines. The default installation supports CPU inference plus Intel, AMD, Nvidia and Apple Silicon GPUs, including integrated graphics, which makes it a good option for AMD and Intel owners. It needs Python 3.11 to 3.14. Its licence is the MinerU Open Source License, based on Apache 2.0 with additional conditions, so read it before commercial use.

4. olmOCR: best for scans if you have a big graphics card

olmOCR, from the Allen Institute for AI (AI2), takes a different approach: it reads every page with a 7-billion-parameter vision-language model. Its README says it converts PDF, PNG and JPEG documents into clean Markdown, handles equations, tables, handwriting and complex formatting, removes headers and footers, and keeps a natural reading order in multi-column layouts.

The cost is hardware. For local GPU inference the README asks for a recent Nvidia GPU with at least 12GB of GPU memory (it lists the RTX 4090, L40S, A100 and H100 as tested) and 30GB of free disk space, and it recommends a clean Python environment because its requirements are difficult to install alongside other tools. It's Apache 2.0-licensed. If your documents are mostly digital PDFs, Docling or Marker will be lighter; olmOCR makes sense for piles of scans and handwritten pages on a 12GB-plus card. Our how much VRAM guide explains why you may not be able to run it alongside a large chat model at the same time.

How we chose

We looked for open-source tools that run locally, output Markdown or structured JSON suitable for RAG, and are actively documented by their developers. We compared licences, supported inputs and the hardware each developer says you need, rather than speed claims, because each project benchmarks itself on different tests. Simpler OCR apps that only extract plain text are covered in our best free OCR software guide.

Tips for better results

  • Test with your own documents. Pick three or four of your hardest files, such as a scanned letter, a table-heavy spec sheet and a two-column paper, and compare the Markdown from two tools.

  • Keep images out of RAG files. Docling's --image-export-mode placeholder and Marker's --disable_image_extraction keep Markdown files small.

  • Match chunks to your embedding model. If a tool produces chunks for you, set the tokenizer to the embedding model you'll use; see our best local embedding models.

  • Mind VRAM. Converting documents while a large LLM is loaded can run your graphics card out of memory; convert first, then chat.

The bottom line

Docling is the best PDF-to-Markdown converter for most local RAG setups: it's MIT-licensed, runs with or without a GPU, reads almost any document type and plugs straight into Open WebUI and popular RAG frameworks. Marker is the pick for maths-heavy or scanned PDFs if its model licence suits you, MinerU suits AMD, Intel and low-memory PCs thanks to its tiers, and olmOCR is worth trying for scans if you have an Nvidia card with 12GB or more.

Sources

  1. 01Docling project, Docling GitHub README
  2. 02Docling documentation, Supported formats
  3. 03Datalab, Marker GitHub README
  4. 04OpenDataLab, MinerU GitHub README
  5. 05Allen Institute for AI, olmOCR GitHub README
  6. 06Open WebUI documentation, Retrieval Augmented Generation (RAG)

About the author

Hannah Vance

Buying Guides & Peripherals Editor

Hannah edits Forge PC's buying guides and component roundups across gaming monitors, mechanical keyboards, mice, cases and power supplies. She specialises in OLED and Mini-LED panel characteristics, low-latency wireless peripherals, acoustic damping and value-for-money component selection for UK PC builders.

More from Hannah Vance

Read next

RX 9060 XT 16GB vs RX 9070: Is the Bigger Radeon Worth the Step Up?

Versus

RX 9060 XT 16GB vs RX 9070: Is the Bigger Radeon Worth the Step Up?

The RX 9060 XT 16GB and RX 9070 both have 16GB of GDDR6, but AMD's specs show the RX 9070 has 56 compute units to 32, a 256-bit bus with twice the bandwidth and a 650W PSU recommendation. We compare them on official specs to show who should pay for the bigger card.

Callum Reid4 min

MangoHud-next Beta Arrives: A Rewritten Linux Performance Overlay

News

MangoHud-next Beta Arrives: A Rewritten Linux Performance Overlay

MangoHud 0.8.5-rc1 introduces MangoHud-next, a beta server/client rewrite of the Linux performance overlay with YAML layouts, per-process GPU and VRAM metrics, a reworked FPS limiter and direct Gamescope support. It runs alongside MangoHud-classic, so existing setups are unchanged.

Eleanor Shaw4 min

How to Convert PDFs to Markdown for Local AI with Docling

How-To

How to Convert PDFs to Markdown for Local AI with Docling

Clean input documents make local AI document chat far more accurate. Using Docling's official documentation, we show how to install the free tool, convert PDFs to Markdown or chunks, handle scans with OCR and use your graphics card to speed it up.

Marcus Thorne6 min

Docling vs Marker: Which PDF-to-Markdown Tool Is Best for Local AI?

Versus

Docling vs Marker: Which PDF-to-Markdown Tool Is Best for Local AI?

Docling and Marker are two of the most popular free tools for turning PDFs into clean Markdown for local AI document chat. We compare their licences, hardware needs, GPU use, supported formats and features, using each project's official documentation.

Callum Reid5 min