Favicon of Zerox

Zerox

Open-source OCR library for Node.js and Python that converts documents to Markdown using cloud vision models. MIT licensed; page images leave your machine.

Zerox is an MIT-licensed OCR library for developers preparing documents for AI applications. Its Node.js and Python packages run on your own machine or server, while cloud vision models read the document pages and produce Markdown. Document conversion happens locally, but page images go to the selected model provider, so this workflow needs internet access and provider credentials.

The library accepts PDFs, images and office documents such as DOCX, from local files or URLs. Its vision-based approach addresses documents with unusual layouts, tables and charts, where the page's visual structure matters alongside the text. You can keep the Markdown for downstream processing or, in Node.js, extract specific fields as structured data using JSON Schema.

Model choices include GPT-4o and GPT-4.1 through OpenAI or Azure OpenAI, Claude through AWS Bedrock, and Google Gemini. Python also supports Vertex AI and uses LiteLLM for model-provider access. Omni offers a hosted OCR demo separately from the packages you run yourself.

Both packages support selected-page processing and concurrent requests. They also offer a formatting mode that helps keep tables consistent across pages, at the cost of slower processing. Node.js adds orientation correction and edge trimming, plus structured extraction for individual pages or whole documents. It can use a different model for extraction than for OCR. Python supports custom system prompts for controlling the Markdown conversion.

Similar to Zerox