Optical character recognition
Optical character recognition (OCR) is software that reads text from images, such as scanned pages, photos or screenshots, and turns it into machine-readable characters that can be searched, copied or fed to a model.
Also called: OCR
By Divya Sharma · Checked Nov 15, 2026 · How we review
A scanned contract is a picture, not text. Until OCR runs, a search index or language model sees nothing in it. OCR is therefore the first step of document parsing for any scanned or photographed material.
How it works
Classic engines find lines of text on the page, then recognise the characters in each line. Tesseract is the long-standing open-source example: version 4 added a neural network (LSTM) engine focused on whole lines, and it supports more than 100 languages. Modern OCR models go further and read a full page image with a transformer or a vision-language model, producing Markdown with headings and tables rather than plain lines.
Example
A team indexing old paper invoices runs OCR to get the text, uses layout analysis to keep the line items in order, and only then splits the result for retrieval. Reviews of OCR models such as Mistral OCR 4 and Surya OCR 2.5 cover speed and accuracy trade-offs.
Limits
Accuracy falls on low-resolution scans, handwriting, unusual fonts and mixed scripts. Classic engines return text without structure, so tables come out as jumbled lines. Model-based OCR handles structure better but can produce fluent text that is not on the page, so spot-check against the image. OCR is not needed for PDFs that already contain a text layer.
Related terms
- Document parsing
- Document parsing converts files such as PDFs, scans, slides and spreadsheets into structured text that software can use, keeping headings, reading order, tables and images instead of a flat stream of characters.
- Vision-language model
- A vision-language model (VLM) is a model that takes images and text as input and produces text, so it can describe pictures, answer questions about them, read documents and extract data from screenshots.
- Layout analysis
- Layout analysis is the part of document parsing that finds the regions on a page, such as titles, paragraphs, tables, figures, captions and footers, labels each one, and works out the order a person would read them in.
- Table extraction
- Table extraction is the task of finding tables in documents and rebuilding their rows, columns, headers and cells as structured data, such as HTML, Markdown or CSV, instead of loose lines of text.
- Multimodal model
- A multimodal model is an AI model that can take in, and sometimes produce, more than one kind of data, such as text, images, audio or video, within a single model rather than through separate systems.