OCRmyPDF vs Kraken
Pick OCRmyPDF to make scanned modern PDFs searchable and PDF/A compliant on any CPU machine. Pick Kraken for historical manuscripts, early prints and right-to-left or non-Latin scripts, where you can train on your own material. The main split is job type: OCRmyPDF adds a text layer to a PDF, while Kraken is a trainable recognition system that outputs ALTO, PageXML and hOCR.
OCRmyPDFocrmypdf/ocrmypdf | Krakenkraken/kraken | |
|---|---|---|
| Type | Open source | Open source |
| Price | 1 credit / page | 1 credit / page |
| Per 1,000 pages | $1.00 | $1.00 |
| Typical speed | 1.0 s / page | 1.5 s / page |
| Best for | Searchable PDFs from scans | Historical documents and manuscripts |
| Inputs | PDF, images | images |
| Languages | 100+ languages (via Tesseract) | Many scripts, incl. right-to-left |
| Max pages per request | 1,000 | 500 |
| Tables | No | No |
| Handwriting | No | ✓ Yes |
| Math | No | No |
| Bounding boxes | No | ✓ Yes |
| Confidence | No | No |
| Forms | No | No |
| 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 validated searchable PDF/A output for archiving, with the OCR layer inserted losslessly where possible.
- You run an office scanner pipeline and want a command-line tool that spreads work across all CPU cores.
- You need 100+ languages through Tesseract language packs without training anything.
Choose Kraken if
- You transcribe historical manuscripts or early prints and need trainable layout analysis, reading order and character recognition.
- You work with Arabic, Hebrew or other scripts that need right-to-left, BiDi or top-to-bottom support.
- You feed digital humanities tools that expect ALTO, PageXML, abbyyXML or hOCR, and you can start from community models on Zenodo.
Key differences
| OCRmyPDF | Kraken | |
|---|---|---|
| Licence | MPL-2.0 | Apache-2.0 |
| How you run it | Command-line tool, local, CPU only, uses all cores | Python library installed with pip on Linux or macOS (x64 or ARM, Python 3.10 to 3.13); no Windows support |
| Output formats | Searchable PDF/A, plain text | ALTO, PageXML, hOCR, plain text, bounding boxes |
| Target material | Scanned PDF archives, PDF/A workflows, office scanner pipelines | Historical manuscripts, early prints, non-Latin and RTL scripts |
| Training | None. Accuracy is capped by Tesseract, with no layout, table or Markdown output | Trainable layout, reading order and recognition; usually needs training on your own material for good accuracy |
| Price | Free, self-hosted (you pay for compute) | Free, self-hosted (you pay for compute) |
| Known failure | --skip-text with default PDF/A output removes form fields (issue #1790); hangs on PDFs whose forms share one Resources dictionary (issue #1763) | Install can fail with a dependency conflict (issue #816); learned line order is lost in segmentation and text output (issue #820) |
Sources
- OCRmyPDF GitHub README
- Issue #1790 form fields
- Issue #1763 hang
- Kraken GitHub README
- Zenodo OCR models
- Issue #820
What each one is
OCRmyPDF
Command-line tool that adds a searchable text layer to scanned PDFs, using Tesseract.
OCRmyPDF detailsKraken
OCR engine for historical documents and manuscripts, with trainable models for unusual scripts.
Kraken detailsTry both on your own file
Run the file once with each model and compare the output.
Use one, fall back to the other
{"model": "ocrmypdf/ocrmypdf","fallbacks": ["kraken/kraken"],"file_url": "https://example.com/document.pdf"}Questions
More comparisons
OCRmyPDF alternativesKraken alternativesBest OCR models in 2026