OCRmyPDF vs Nanonets-OCR
Pick OCRmyPDF to make scanned PDFs searchable and keep them as PDF/A. Pick Nanonets-OCR to turn printed business documents into Markdown for an LLM pipeline. They solve different problems: OCRmyPDF adds a text layer to a PDF, Nanonets-OCR reads the page and writes structured text.
OCRmyPDFocrmypdf/ocrmypdf | Nanonets-OCRnanonets/nanonets-ocr | |
|---|---|---|
| Type | Open source | Open source |
| Price | 1 credit / page | 2 credits / page |
| Per 1,000 pages | $1.00 | $2.00 |
| Typical speed | 1.0 s / page | 1.8 s / page |
| Best for | Searchable PDFs from scans | Markdown with semantic tags |
| Inputs | PDF, images | PDF, images |
| Languages | 100+ languages (via Tesseract) | Multilingual |
| Max pages per request | 1,000 | 500 |
| Tables | No | ✓ Yes |
| Handwriting | No | No |
| Math | No | ✓ Yes |
| Bounding boxes | No | No |
| Confidence | No | No |
| Forms | No | ✓ Yes |
| Multilingual | ✓ Yes | ✓ Yes |
| On OCRRouter | Available | Available |
Prices are what you pay on OCRRouter. Speed is the provider's typical figure, not a benchmark we ran.
Which to choose
Choose OCRmyPDF if
- You need a validated searchable PDF/A for archiving, with the OCR layer inserted losslessly where possible.
- You have no GPU. It runs on CPU only and spreads work across all CPU cores.
- You need 100+ languages through Tesseract language packs and a clear MPL-2.0 licence.
Choose Nanonets-OCR if
- You need Markdown, HTML, LaTeX or Mermaid output instead of a PDF with a text layer.
- Your documents have signatures, watermarks or checkboxes, which it tags or converts to unicode symbols.
- You have flowcharts or org charts and want them as Mermaid code, or equations with inline and display LaTeX kept apart.
Key differences
| OCRmyPDF | Nanonets-OCR | |
|---|---|---|
| What it does | Adds a Tesseract OCR text layer to scanned PDFs and outputs searchable PDF/A | Image-to-Markdown model fine-tuned from Qwen2.5-VL-3B |
| Output formats | Searchable PDF, plain text | Markdown, HTML, LaTeX, Mermaid |
| Licence | MPL-2.0 | Not stated on the Nanonets-OCR2-3B model card (no licence tag); base model Qwen2.5-VL-3B |
| Hardware | CPU only, uses all cores | Self-hosted 3B model (about 4B params on Hugging Face); GPU use not stated in the published material, but one handwriting test ran at 69.1 s per image on an L4 |
| Benchmarks | Not published | olmOCR-bench overall 69.5, DocVQA 89.43, ChartQA 78.56 (OCR2-3B, reported by the authors) |
| Handwriting | Listed as not suited to handwriting | Not trained on handwriting and can hallucinate; one test saw generation loops with CER up to 2100% |
| Known failure | Fillable form fields are removed with --skip-text and default PDF/A output (issue #1790); a hang occurs on PDFs whose forms share one Resources dictionary (issue #1763) | Trained on a fixed prompt, so hallucination with custom prompts is expected; loses to Gemini 2.5 Flash in 52.43% of head-to-head Markdown comparisons |
Sources
- OCRmyPDF GitHub README
- Issue #1790 form fields
- Issue #1763 hang
- Nanonets-OCR2-3B model card
- Nanonets-OCR-s announcement
- HF discussion fixed prompt
What each one is
OCRmyPDF
Command-line tool that adds a searchable text layer to scanned PDFs, using Tesseract.
OCRmyPDF detailsNanonets-OCR
Open image-to-Markdown model that tags tables, equations, signatures, watermarks and checkboxes.
Nanonets-OCR detailsTry both on your own file
Run the file once with each model and compare the output.
PDF, PNG, JPG, WebP, HEIC. Up to 20 MB each, 10 files.No file?
Use one, fall back to the other
{"model": "ocrmypdf/ocrmypdf","fallbacks": ["nanonets/nanonets-ocr"],"file_url": "https://example.com/document.pdf"}Questions
More comparisons
OCRmyPDF vs Hunyuan OCROCRmyPDF vs dots.ocrRapidOCR vs Nanonets-OCREasyOCR vs Nanonets-OCROCRmyPDF vs NougatMarker vs OCRmyPDFOCRmyPDF vs TrOCRNanonets-OCR vs Adobe Acrobat OCR
OCRmyPDF alternativesNanonets-OCR alternativesBest OCR models in 2026