PDF to Markdown tools compared: which approach fits your files
There isn't one best PDF to Markdown converter. There's a best fit for your files and your setup. If your PDFs are clean digital documents and you're comfortable in a terminal, a free open-source tool will often do the job. If they're scans, dense tables or pages full of figures, you'll want something layout-aware, either a heavier open-source tool running on your own machine (ideally with a GPU) or an online converter. We make ToMarkdown, one of the online options, so take this with that in mind. We've tried to describe every approach the way we'd explain it to a friend, including where ours isn't the right pick.
The approaches at a glance
| Approach | Setup | Scans | Tables | Images | Cost | File stays on your machine? | Good for |
|---|---|---|---|---|---|---|---|
| Copy-paste from a PDF reader | None | No | Usually lost | No | Free | Yes | A paragraph or two |
| MarkItDown | pip install, CLI | Only with an OCR plugin you configure | Simple ones | Not from PDFs | Free (MIT) | Yes, unless your OCR plugin calls a remote service | Fast text extraction, mixed Office files |
| PyMuPDF4LLM | pip install, Python | Needs extra OCR setup | Yes, on digital PDFs | Can export | Free (AGPL-3.0) | Yes | Quick scripts over digital PDFs |
| Docling | Heavier install, layout models | Yes | Layout-aware | Yes | Free (MIT) | Yes | Reports and tables, run locally |
| Marker | Heavier install, faster with a GPU | Yes | Yes | Yes | Code free; check weights licence | Yes | Books, papers, formulas |
| MinerU | Heavier install, GPU recommended | Yes | Yes | Yes | Free with extra licence terms | Yes | Academic papers, formulas |
| OCR first, then extract | OCRmyPDF or Tesseract plus a text tool | Yes | Rarely | No | Free | Yes | Making scans searchable |
| Online converter | None, upload in a browser | Depends on the service | Depends | Depends | Free tiers or pay per use | No, the server processes it | No setup, occasional files |
Licences are as of October 2026. Check each repository before you rely on them, especially for commercial use.
Copy-paste
Open the PDF, select everything and paste it into your editor. It costs nothing and works for a quote or a short section. Headings turn into plain lines, tables collapse into runs of numbers, multi-column pages can interleave, and scans give you nothing. Fine for a paragraph, painful for a document.
Open-source tools you run yourself
MarkItDown (Microsoft, MIT) is the lightest. Install it with pip and run markitdown file.pdf -o out.md. For PDFs it extracts text and some simple tables, but no images. OCR isn't built in: a separate markitdown-ocr plugin sends page images to a vision model you configure yourself. It shines on Word, PowerPoint and Excel files and on PDFs that are mostly plain text. Our free conversion mode runs MarkItDown on our server, so its output is a good preview of what MarkItDown gives you locally.
PyMuPDF4LLM (AGPL-3.0) is a small Python package built on PyMuPDF. It's quick on digital PDFs, handles headings and tables reasonably and can save images. For scans you need to set up OCR separately. Note the AGPL licence if you're building it into a product.
Docling (MIT) uses layout and table-structure models, so it does better on multi-column pages and complex tables, and it can OCR scans. The trade-off is a heavier install and slower runs than MarkItDown.
Marker has Apache-2.0 code, but its model weights use a modified OpenRAIL-M licence with limits on larger commercial use. Check the weights licence if that applies to you. It handles tables, formulas, images and scans, and runs much faster with a GPU.
MinerU is Apache-2.0 with extra terms: very large commercial users need a separate licence, and online services built on it must say so. It's popular for academic papers and formulas, and a GPU is recommended.
All of these install with Python on macOS, Windows or Linux, which also answers the common "offline" and "on a Mac" questions: once installed, they run without uploading anything. Independent benchmarks exist, and results vary a lot by document type, so test on your own files rather than trusting any single ranking (including ours).
OCR first, then extract
For scans, a classic pipeline is OCRmyPDF (which uses Tesseract) to add a text layer, then any text tool to pull the text out. It's free, local and dependable for making scans searchable. The Markdown structure you get afterwards is usually thin: few headings, tables rarely rebuilt, figures not cropped.
Online converters
Upload in a browser and download Markdown. No installs, no GPU, and the service decides how to handle each page. In exchange, your file goes to someone else's server, and anything beyond a free tier costs money. Read the retention and privacy terms before uploading anything sensitive.
Where ToMarkdown fits, honestly
ToMarkdown is an online converter with two modes:
- Free conversion: no sign-in, PDFs up to 10 MiB and 100 pages, MarkItDown text extraction on our server with no AI. No images, no scan recognition, and headings, tables or column order aren't guaranteed. Free documents are deleted 24 hours after upload.
- AI conversion: sign in with a verified email and top up from US$5 (one-time, no subscription). PDFs up to 20 MiB and 200 pages. Every page is checked automatically: digital pages keep the PDF's own text without it being rewritten, scanned pages are transcribed with illustrations cropped out, tables become Markdown tables, and watermarks, running headers, footers and page numbers are left out. You compare each page with the original, redo a single page if it's off, and download Markdown or a ZIP with an
images/folder. Our six measured documents (44 pages) averaged about US$0.005 per page, between US$0.002 and US$0.009 per page by document, billed by actual usage. See pricing.
What it isn't: there's no public API or batch pipeline, it can't run offline or in an air-gapped network, and the limit is 200 pages per PDF. If you need any of those, one of the local tools above is the better choice.

How to test any tool in ten minutes
Pick your hardest page, not your easiest. Our examples page uses six kinds of page we'd suggest testing with any tool:
- A magazine contents page with three columns and a watermark (reading order, watermark removal)
- A slide with a wall of partner logos (image handling)
- A table with two header rows and merged cells (table structure)
- A scanned test with fill-in blanks (OCR detail)
- A scanned book page with a figure (scan plus image cropping)
- A table exported from Word (the easy case, which should come out clean)
Run the same pages through two or three tools and compare the output with the original side by side. If you're not sure whether your file is a scan, check if the PDF is scanned first. Tables get their own guide: PDF tables to Markdown.
When ToMarkdown isn't the right tool
- Hundreds of files, a scheduled job or an API integration: use a local library.
- Files that must never leave your machine: use a local tool.
- Very long PDFs over 200 pages: split them or use a local tool.
- A one-paragraph quote: copy-paste is faster.
Questions
Which free PDF to Markdown tool should I start with?
For digital PDFs, MarkItDown or PyMuPDF4LLM is the quickest to try. For scans or complex tables, Docling, Marker or MinerU are worth the heavier install. Want to see the free result without installing anything? Try free conversion.
MarkItDown vs Docling vs Marker: what's the real difference?
MarkItDown is a light, text-first converter for many file types. Docling and Marker use layout models, so they cope better with columns, tables, figures and scans, at the cost of a heavier setup and more computing power.
Can I convert PDF to Markdown offline on a Mac?
Yes. All the open-source tools here install with Python on macOS and run locally once installed. The heavier ones are slower without a GPU, so check each project's install notes.
Does Markdown keep the PDF's layout?
It keeps structure (headings, paragraphs, lists, tables, image links), not visual layout like fonts, exact positions or columns side by side. If the page has to look identical, keep the PDF.
Is an online converter safe for confidential files?
That depends on the service's terms. With ToMarkdown, free documents are deleted 24 hours after upload, and AI conversion sends page material to a third-party AI model service, as our privacy policy explains. For files that can't leave your machine, use a local tool.