Skip to content

Ocrs

Small, pure-Rust OCR library and CLI with its own neural models, which builds anywhere including WebAssembly but reads Latin script only.

Reviewed by Sheela · Updated

View on GitHub Open source

Our rating

3.8/5

Ocrs is the OCR engine to embed when you want a clean Rust build and English text, and the wrong one the moment a page arrives in Chinese.

What is Ocrs?

Ocrs is a Rust library and command-line tool that extracts text from images: scans, photos and screenshots. It runs a three-stage pipeline (text detection, layout analysis, line recognition) of small neural networks trained in PyTorch, exported to ONNX and executed by RTen, a Rust inference engine by the same author, Robert Knight. There is no C++ dependency, so it compiles for WebAssembly as well as desktop and server targets.

The models are trained only on openly licensed data, currently Google's HierText (CC-BY-SA 4.0), and the training code lives in a companion repository, ocrs-models, so you can fine-tune or retrain. Output is plain text, JSON with word and line positions, or an annotated PNG.

The project calls itself an early preview and recognises the Latin alphabet only. It is actively maintained: version 0.13.1 shipped on 13 September 2026, the crate has about 477,000 downloads on crates.io, and the repository has about 1,900 stars under Apache-2.0.

Is Ocrs worth it?

Ocrs is the most mature of the pure-Rust OCR engines we looked at, and its limits are stated on the front page: early preview, Latin alphabet only, more errors than commercial engines. Within those limits it does what the heavier options cannot. It builds with cargo alone, runs in a browser through WebAssembly, and its models are small enough to download on first run into a local cache.

The engineering is steady rather than flashy. The 0.13 releases moved to RTen 0.26, which the changelog says made recognition 15 to 20% faster, switched the default models to ONNX ahead of retiring RTen's own format, and added a C API so other languages can call it. About 289,000 of its 477,000 crate downloads came in the last 90 days, which suggests it is being pulled into other projects.

The gaps show in the issue tracker. Requests for Japanese (open since December 2024), wider language support, confidence scores on output and rotated-image handling are all still open, and a recent report says currency signs are not recognised. Layout analysis is labelled very much work in progress in the models repository, so multi-column pages and tables come back as lines of text rather than structure. A community fork, ocrs-cjk, adds PaddleOCR models for Chinese, Japanese and Korean, but it has four stars and one maintainer.

Compared with vision-language models such as PaddleOCR-VL or DeepSeek-OCR, Ocrs is a different tool: it reads characters, not documents. That makes it cheap and predictable for screenshots, labels and clean English scans, and a poor fit for invoices, forms or anything where reading order and tables matter.

Where it earns its place

  • A Rust developer building a desktop screenshot tool

    Copy text out of any screenshot on the clipboard

    cargo install ocrs-cli --locked --features clipboard, then ocrs -c reads the clipboard image and prints the text. Free and offline after the first model download; English UI text is the sweet spot.

  • A front-end team at a document-scanning start-up

    Run OCR in the browser so images never reach their servers

    Compile the library to WebAssembly and ship the ONNX models as static assets. No inference servers to pay for and a simpler privacy story, at the cost of Latin-only recognition and weaker accuracy than server-side vision models.

  • An ML engineer at a logistics firm reading shipping labels

    Fine-tune recognition on their own label photos

    Use the ocrs-models training guide to fine-tune the detection and recognition models in PyTorch, export to ONNX and load them in Ocrs. One GPU for training; inference then runs on CPU in the warehouse app.

Before you commit

Setup
cargo install ocrs-cli --locked, then ocrs image.png; models download to ~/.cache/ocrs on first run. Library use needs release builds, since debug builds are very slow, and Rust 1.94 or later as of 0.13.0.
Integrations
Rust crate, CLI, C API (since 0.13.0) and WebAssembly; JSON output with word and line boxes. No Python package from the maintainer.
Data and privacy
Runs fully locally; the only network call is the first model download from Hugging Face. Apache-2.0 code; training data is HierText under CC-BY-SA 4.0.
Cost at scale
CPU only and lightweight, so cost is ordinary compute; the maintainer publishes no throughput figures and sells no paid edition.
Limits
Latin script only; about 21 open issues and pull requests, including Japanese support, confidence scores and rotated images; layout analysis is work in progress; .rten model support is being phased out in favour of ONNX.

What's good

  • Pure Rust; builds with cargo and runs in WebAssembly
  • Small models trained only on openly licensed data
  • Training code published for fine-tuning
  • Active releases; 0.13 made recognition 15 to 20% faster

What's not

  • Latin alphabet only
  • Self-described early preview with more errors than commercial OCR
  • No confidence scores in output yet
  • No table or document-structure output

Best for

Rust and WebAssembly developers who need lightweight English-language OCR inside their own application.

Ocrs alternatives

Ocrs: common questions

Is Ocrs worth it?
Ocrs is the OCR engine to embed when you want a clean Rust build and English text, and the wrong one the moment a page arrives in Chinese. We rate it 3.8 out of 5.
How much does Ocrs cost?
Free under Apache-2.0; models are free to download from Hugging Face.
What are the downsides of Ocrs?
Latin alphabet only; self-described early preview with more errors than commercial OCR; no confidence scores in output yet; no table or document-structure output.
Who is Ocrs best for?
Rust and WebAssembly developers who need lightweight English-language OCR inside their own application.
How much does Ocrs cost for a team or in production?
CPU only and lightweight, so cost is ordinary compute; the maintainer publishes no throughput figures and sells no paid edition.
Is Ocrs safe for company data?
Runs fully locally; the only network call is the first model download from Hugging Face. Apache-2.0 code; training data is HierText under CC-BY-SA 4.0.
What are the best Ocrs alternatives?
The closest alternatives we have reviewed are ocr-rs (formerly rust-paddle-ocr), Xberg (formerly Kreuzberg), deepseek-ocr.rs and Docling.

Answers checked Oct 26, 2026.