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/docling | Florence-2microsoft/florence-2 | |
|---|---|---|
| Type | Open source | Open source |
| Price | 2 credits / page | 1 credit / page |
| Per 1,000 pages | $2.00 | $1.00 |
| Typical speed | 2.2 s / page | 0.8 s / page |
| Best for | Structured export for RAG | Lightweight OCR with boxes |
| Inputs | PDF, images, DOCX | images |
| Languages | Latin scripts, CJK | English |
| Max pages per request | 500 | 500 |
| Tables | ✓ Yes | No |
| Handwriting | No | No |
| Math | ✓ Yes | No |
| Bounding boxes | ✓ Yes | ✓ Yes |
| Confidence | No | No |
| Forms | No | No |
| Multilingual | No | No |
| 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 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
| Docling | Florence-2 | |
|---|---|---|
| What it is | Python library from IBM Research that converts documents into a structured DoclingDocument | Microsoft prompt-based vision model with OCR, captioning and detection tasks |
| Output formats | Markdown, HTML, JSON, DocTags, plain text | Plain text and bounding boxes only. No Markdown, tables or LaTeX. |
| Licence and cost | MIT (individual models have their own licences). Free, self-hosted. | MIT. Free, self-hosted. |
| Size | GraniteDocling VLM option: 258M | 0.23B (base), 0.77B (large) |
| Scanned pages and languages | Accuracy 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. |
| Handwriting | Not published | Spelling errors and missing spaces on cursive handwriting in a Hugging Face blog test |
| Known failures | Version 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
- Docling GitHub README
- Supported formats
- Issue #5254 OCR regression
- Florence-2-large model card
- HF blog OCR test
- HF discussion Chinese very bad
What each one is
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 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": "ibm/docling","fallbacks": ["microsoft/florence-2"],"file_url": "https://example.com/document.pdf"}Questions
More comparisons
Docling vs Tesseract.jsDocling vs Typhoon OCRTesseract vs Florence-2MinerU vs Florence-2LlamaParse vs DoclingPaddleOCR-VL vs DoclingMinerU vs DoclingDocling vs Tesseract
Docling alternativesFlorence-2 alternativesBest OCR models in 2026