An open OCR model that tops benchmarks and preserves page layout
It converts images and PDFs into structured HTML, Markdown, or JSON while reconstructing tables, forms, and handwriting that most OCR tools reduce to plain text soup.

What it does
Chandra OCR 2 ingests images and PDFs and emits structured HTML, Markdown, or JSON while preserving the visual logic of the original page—tables, math, forms, checkboxes, and multi-column layouts. It handles more than 90 languages and can run locally via HuggingFace or remotely through a vLLM server. The project is backed by a managed API tier, though the open weights carry a modified OpenRAIL-M license that favors research, personal projects, and early-stage startups under $2M revenue.
The interesting bit
The maintainers built a 90-language benchmark from scratch because public OCR test sets are largely English-centric. On their tables, the open model outperforms olmOCR 2, GPT-4o, and Gemini Flash 2 on math, old scans, and complex tables—suggesting the architecture actually understands document geometry rather than simply reading text left-to-right.
Key highlights
- Ranks above olmOCR 2, GPT-4o, and Gemini Flash 2 on the project’s olmocr benchmark table, and shows strong gains on an internal 90-language suite.
- Reconstructs complex layouts: tables, math, forms with checkboxes, images with captions, and multi-column text.
- Two inference modes: a local
hfbackend or a remote vLLM server for heavier batch work. - Every processed file yields parallel Markdown, HTML, and JSON outputs alongside metadata and extracted images.
- OpenRAIL-M license allows free research and personal use; startups under $2M revenue are covered, but commercial self-hosting requires a separate license and competitive use is barred.
Caveats
- The hosted Datalab API still edges out the open Chandra 2 weights on the project’s own benchmark table, so self-hosters sacrifice a few accuracy points for privacy.
- The license includes a non-compete clause: you cannot use the open weights to build a service that competes with the Datalab API.
Verdict
A solid choice for developers who need to turn scanned textbooks, handwritten notes, or financial forms into structured data without flattening them into plain text. Avoid it if you need a fully unrestricted commercial license or plan to launch a competing document-extraction API.
Frequently asked
- What is datalab-to/chandra?
- It converts images and PDFs into structured HTML, Markdown, or JSON while reconstructing tables, forms, and handwriting that most OCR tools reduce to plain text soup.
- Is chandra open source?
- Yes — datalab-to/chandra is open source, released under the Apache-2.0 license.
- What language is chandra written in?
- datalab-to/chandra is primarily written in Python.
- How popular is chandra?
- datalab-to/chandra has 11.8k stars on GitHub and is currently accelerating.
- Where can I find chandra?
- datalab-to/chandra is on GitHub at https://github.com/datalab-to/chandra.