OCR for Node that refuses to download, compile, or phone home
Most OCR libraries make you fetch models, install system fonts, or compile native code after the fact; this one ships PP-OCRv6, PDFium, and a fallback font in one offline package.

What it does
light-ocr is a native Node.js and C++ library for offline text recognition in images and PDFs. It wraps PP-OCRv6 Small to return lines of text in reading order, each with a confidence score and quadrilateral coordinates. The package carries its own model, PDF renderer, and Chinese fallback font, so recognition stays local and requires no secondary downloads or system dependencies.
The interesting bit
The project treats “self-contained” as a feature, not a bug: it pins a PDFium binary and a Noto Sans SC font directly inside the platform-specific tarball. Hardware acceleration is automatic—Core ML on Apple Silicon macOS 15+, WebGPU via Vulkan on Linux x64, and WebGPU via D3D12 on Windows x64—falling back to CPU everywhere else.
Key highlights
- Runs fully offline; images, PDFs, and results never leave the machine.
- Ships as a single platform package with no postinstall scripts, runtime model downloads, or compiler requirements.
- Returns structured output: text, confidence, bounding boxes, page metadata, and timing.
- Offloads recognition from the JavaScript main thread and supports cancellation and explicit cleanup.
- Includes a CLI and an “Agent Skill” for local AI-agent workflows.
Caveats
- Hardware acceleration is limited to Apple Silicon macOS, Linux x64, and Windows x64; macOS Intel and ARM64 Linux/Windows fall back to CPU.
- Smaller
tiny(~6.3 MB) and largermedium(~139 MB) model tiers are currently preview-only under anexttag. - Downstream macOS app packagers must re-sign the native binaries with a matching Developer ID or ad-hoc identity for notarization.
Verdict
Worth a look if you need deterministic, local OCR inside a Node.js service, CLI, or desktop app without managing model artifacts. Skip it if you need cloud-scale throughput or a purely browser-based solution.
Frequently asked
- What is arcships/light-ocr?
- Most OCR libraries make you fetch models, install system fonts, or compile native code after the fact; this one ships PP-OCRv6, PDFium, and a fallback font in one offline package.
- Is light-ocr open source?
- Yes — arcships/light-ocr is open source, released under the Apache-2.0 license.
- What language is light-ocr written in?
- arcships/light-ocr is primarily written in C++.
- How popular is light-ocr?
- arcships/light-ocr has 501 stars on GitHub.
- Where can I find light-ocr?
- arcships/light-ocr is on GitHub at https://github.com/arcships/light-ocr.