oneocr
Windows 11 built-in OCR engine, wrapped in pure Java - and the 1ocr command line tool.oneocr
Windows 11's built-in OCR engine, wrapped in pure Java — and a command line tool built on it.
Website ·
Live output ·
The 1ocr command
The Windows 11 Snipping Tool carries an undocumented ~50 MB Microsoft OCR model called OneOCR. It is fast, it is already on the machine, and it reads Latin, Devanagari and Tamil well. It has no public API.
These repositories bind it from Java through the Foreign Function & Memory API — no JNI, no native glue to compile — and build a command line tool on top that reads images, PDFs and whole folders, and writes text, JSON, SVG and a browser-renderable semantic XHTML that keeps every word's bounding box and confidence.
The work rests on the reverse-engineering of b1tg/win11-oneocr and others.
Repositories
| Repository | Maven artifact | What it is |
|---|---|---|
| cli | io.github.oneocr:oneocr-cli |
The 1ocr command — images, PDFs, folders, and the layout-aware export |
| api | io.github.oneocr:oneocr-api |
The FFM binding to oneocr.dll. Use this to build your own tool |
| tesseract | io.github.oneocr:oneocr-tesseract |
Optional Tesseract 5 second pass, for the scripts OneOCR cannot read |
| xhtml_controls_js | io.github.oneocr:oneocr-xhtml_controls_js |
The viewer controls for that XHTML, written in Java and compiled to JS by TeaVM |
| semantic_xhtml | — | The CSS and JS every generated document links, served over GitHub Pages |
Quick start
1ocr page.png # txt, json, svg and semantic xhtml beside the input 1ocr pdf order.pdf --layout # every page, plus a layout-aware text and html export 1ocr folder ./scans -r # a whole tree, resumable 1ocr layout order.pdf.oneocr.xhtml # re-render from saved boxes, no second OCR pass
Needs JDK 22+ (JDK 21 works with --enable-preview) and Windows 11.
Two things worth knowing
The native libraries are not distributed here. oneocr.dll, oneocr.onemodel, onnxruntime.dll and opencv_world*.dll are Microsoft components that ship with Windows. Take them from your own installation and drop them in api/src/main/resources/natives/.
Line order is not reading order. The engine reports lines in its own sequence, so a cause title set in two columns comes out interleaved. --layout recovers the real structure by recursive X-Y cutting over the line boxes and writes a parallel text and HTML rendering. On a real 83-page court notice it rejoined 145 orphaned fragments and unscrambled the table of contents.
Status
Windows only today. Linux is the next target, and C sources are expected alongside the Java.
Popular repositories Loading
-
onnx
onnx
Public
The Windows 11 OneOCR pipeline in pure Java over ONNX Runtime. Runs on Linux, macOS and Windows with no oneocr.dll.
-
cli
cli
Public
Command-line tools and output formatters for Windows 11 OneOCR using Java FFM (Foreign Function & Memory API).
Java 1
-
api
api
Public
Java FFM (Foreign Function & Memory API) wrapper for Windows 11 SnippingTool OCR engine.
Java 1
-
xhtml_controls_js
xhtml_controls_js
Public
Java
-
tesseract
tesseract
Public
Optional Tesseract 5 second pass (Java FFM) for Indic and other scripts Windows 11 OneOCR cannot read.
Java
-
semantic_xhtml
semantic_xhtml
Public
Published CSS and JS for the OneOCR semantic XHTML5 output format. Served over GitHub Pages and linked by every generated OCR document.
Java
Repositories
Showing 9 of 9 repositories-
cli
Public
Command-line tools and output formatters for Windows 11 OneOCR using Java FFM (Foreign Function & Memory API).
Uh oh!
There was an error while loading. Please reload this page.
oneocr/cli's past year of commit activity Java 1 0 0 0 Updated Nov 12, 2026 -
api
Public
Java FFM (Foreign Function & Memory API) wrapper for Windows 11 SnippingTool OCR engine.
Uh oh!
There was an error while loading. Please reload this page.
oneocr/api's past year of commit activity Java 1 0 0 0 Updated Nov 12, 2026 -
onnx
Public
The Windows 11 OneOCR pipeline in pure Java over ONNX Runtime. Runs on Linux, macOS and Windows with no oneocr.dll.
Uh oh!
There was an error while loading. Please reload this page.
oneocr/onnx's past year of commit activity Java 2 1 0 0 Updated Sep 11, 2026 -
modelex
Public
Extracts the ONNX sub-models and vocabularies out of Windows 11 oneocr.onemodel, in pure Java. Windows only, run once. Bootstrap for oneocr/onnx.
Uh oh!
There was an error while loading. Please reload this page.
oneocr/modelex's past year of commit activity Java 0 0 0 0 Updated Aug 19, 2026 -
oneocr.github.io
Public
The oneocr website: what it is, what it emits, and live sample output.
Uh oh!
There was an error while loading. Please reload this page.
oneocr/oneocr.github.io's past year of commit activity HTML 0 0 0 0 Updated Aug 19, 2026 -
semantic_xhtml
Public
Published CSS and JS for the OneOCR semantic XHTML5 output format. Served over GitHub Pages and linked by every generated OCR document.
Uh oh!
There was an error while loading. Please reload this page.
oneocr/semantic_xhtml's past year of commit activity Java 0 0 0 0 Updated Aug 19, 2026 -
xhtml_controls_js
Public
Uh oh!
There was an error while loading. Please reload this page.
oneocr/xhtml_controls_js's past year of commit activity Java 0 0 0 0 Updated Aug 19, 2026 -
tesseract
Public
Optional Tesseract 5 second pass (Java FFM) for Indic and other scripts Windows 11 OneOCR cannot read.
Uh oh!
There was an error while loading. Please reload this page.
oneocr/tesseract's past year of commit activity Java 0 0 0 0 Updated Aug 19, 2026 -
.github
Public
Organisation profile for oneocr.
Uh oh!
There was an error while loading. Please reload this page.
oneocr/.github's past year of commit activity 0 0 0 0 Updated Aug 19, 2026
People
This organization has no public members. You must be a member to see who’s a part of this organization.
Top languages
Loading…
Uh oh!
There was an error while loading. Please reload this page.
Most used topics
Loading…
Uh oh!
There was an error while loading. Please reload this page.