OCRRouter

Docling vs Florence-2

Pick Docling to turn born-digital PDFs and Office files into structured JSON or Markdown for RAG. Pick Florence-2 for scene text and short English labels where you need a small model and bounding boxes. The main split is scope: Docling converts whole documents, while Florence-2 returns only text and boxes.

Doclingibm/doclingFlorence-2microsoft/florence-2
TypeOpen sourceOpen source
Price2 credits / page1 credit / page
Per 1,000 pages$2.00$1.00
Typical speed2.2 s / page0.8 s / page
Best forStructured export for RAGLightweight OCR with boxes
InputsPDF, images, DOCXimages
LanguagesLatin scripts, CJKEnglish
Max pages per request500500
Tables✓ YesNo
HandwritingNoNo
Math✓ YesNo
Bounding boxes✓ Yes✓ Yes
ConfidenceNoNo
FormsNoNo
MultilingualNoNo
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 Docling if

  • It reads PDF, DOCX, PPTX, XLSX, HTML, EPUB, images, emails and XBRL through one API.
  • Its lossless JSON export keeps layout, reading order and table structure, and it also writes Markdown, HTML, DocTags and plain text.
  • It plugs into EasyOCR, Tesseract or RapidOCR and into VLMs like the 258M GraniteDocling, and it works with LangChain and LlamaIndex.

Choose Florence-2 if

  • It is very small, at 0.23B (base) and 0.77B (large), so it suits lightweight edge OCR in English.
  • OCR_WITH_REGION returns quadrilateral boxes for each text line.
  • The same model also does captioning, detection and grounding, so one model covers a pipeline that needs more than OCR.

Key differences

DoclingFlorence-2
What it isPython library from IBM Research that converts documents into a structured DoclingDocumentMicrosoft prompt-based vision model with OCR, captioning and detection tasks
Output formatsMarkdown, HTML, JSON, DocTags, plain textPlain text and bounding boxes only. No Markdown, tables or LaTeX.
Licence and costMIT (individual models have their own licences). Free, self-hosted.MIT. Free, self-hosted.
SizeGraniteDocling VLM option: 258M0.23B (base), 0.77B (large)
Scanned pages and languagesAccuracy depends on the OCR engine you plug in. Weak on low-quality scans without a strong engine.Chinese output mostly wrong because the vocabulary lacks CJK characters. Spelling errors and missing spaces on French text.
HandwritingNot publishedSpelling errors and missing spaces on cursive handwriting in a Hugging Face blog test
Known failuresVersion 2.143.1 drops words and numbers with full-page Tesseract OCR (issue #5254). Neighbouring columns can merge on some layouts (issue #5132).Model card notes the continued-pretrained checkpoint used only 0.1B samples and might not be well trained.

Sources

What each one is

Docling

IBM's open-source document converter with a structured document model.

Docling details

Florence-2

Small Microsoft vision model (0.23B and 0.77B) with OCR and OCR-with-regions tasks that return text with boxes.

Florence-2 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": "ibm/docling","fallbacks": ["microsoft/florence-2"],"file_url": "https://example.com/document.pdf"}

Questions

More comparisons

Docling alternativesFlorence-2 alternativesBest OCR models in 2026