OCRRouter

docTR vs Kraken

Pick docTR for modern business documents such as invoices and receipts, where you want word-level text with coordinates from a Python library, and for a Windows-friendly setup. Pick Kraken for historical manuscripts, early prints and non-Latin scripts such as Arabic and Hebrew, where you can train layout and recognition on your own material. The main split is the material: docTR targets modern documents, Kraken targets historical and right-to-left text.

docTRmindee/doctrKrakenkraken/kraken
TypeOpen sourceOpen source
Price1 credit / page1 credit / page
Per 1,000 pages$1.00$1.00
Typical speed0.9 s / page1.5 s / page
Best forWord-level OCR with positionsHistorical documents and manuscripts
InputsPDF, imagesimages
LanguagesMainly Latin scriptsMany scripts, incl. right-to-left
Max pages per request500500
TablesNoNo
HandwritingNo✓ Yes
MathNoNo
Bounding boxes✓ Yes✓ Yes
Confidence✓ YesNo
FormsNoNo
MultilingualNo✓ Yes
On OCRRouterAvailableAvailable

Prices are what you pay on OCRRouter. Speed is the provider's typical figure, not a benchmark we ran.

Which to choose

Choose docTR if

  • You need word-level OCR with coordinates, exported as a nested page, block, line and word JSON structure.
  • You are processing invoices or receipts and feeding the text into your own extraction step, with a key information extraction predictor available.
  • You want a choice of detection and recognition architectures, with straight or rotated boxes, plus ready Docker images (GPU images need CUDA 12.2 or newer on the host).

Choose Kraken if

  • You work with historical manuscripts, early prints or other historical material.
  • You need right-to-left, BiDi or top-to-bottom scripts such as Arabic and Hebrew.
  • You need ALTO, PageXML, abbyyXML or hOCR output for digital humanities tools, and you are ready to train layout analysis, reading order and recognition on your own material.

Key differences

docTRKraken
Target materialWord-level OCR for invoices, receipts and similar documentsHistorical documents and non-Latin scripts
Licence and priceApache-2.0, free, self-hosted (you pay for compute)Apache-2.0, free, self-hosted (you pay for compute)
PlatformPython on PyTorch; CPU or NVIDIA GPU; Docker images, GPU ones need CUDA 12.2 or newer on the hostLinux or macOS only, x64 or ARM, Python 3.10 to 3.13; no Windows support
Output formatsJSON, plain text, bounding boxesALTO, PageXML, hOCR, plain text, bounding boxes
TrainingChoice of detection and recognition architectures; suited to Python ML teams training their own modelsTrainable layout analysis, reading order and recognition; usually needs training on your own material for good accuracy
Known failureSplit-crop merging misjoins readings across repeated characters (issue #2229); cropping images leads to poorer results (issue #2007)Install can fail with a dependency conflict (issue #816); learned line order is lost in segmentation and text output (issue #820)
BenchmarksNot publishedNot published

Sources

What each one is

docTR

Open-source OCR library from Mindee with separate text detection and recognition models.

docTR details

Kraken

OCR engine for historical documents and manuscripts, with trainable models for unusual scripts.

Kraken details

Try 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": "mindee/doctr","fallbacks": ["kraken/kraken"],"file_url": "https://example.com/document.pdf"}

Questions

More comparisons

docTR alternativesKraken alternativesBest OCR models in 2026