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.