# Optical character recognition (OCR)

> Optical character recognition is technology that reads printed or handwritten text from images and scanned documents and turns it into machine-readable text that software can search, extract from or pass to a language model.

Also called: OCR, text recognition, document scanning, scanned PDF to text. Category: Data and retrieval. Source: https://aibuildindex.com/glossary/ocr

## In the index

- Document data extraction: median $1,400, middle half $250 to $5,000, 423 priced briefs (https://aibuildindex.com/cost/document-data-extraction)
- Invoice and receipt extraction: median $1,000, middle half $200 to $4,600, 119 priced briefs (https://aibuildindex.com/cost/invoice-extraction)
- OCR: median $3,500, middle half $500 to $9,600, 155 priced briefs (https://aibuildindex.com/skills/ocr)

Optical character recognition, or OCR, is how a computer reads a picture of text. A scanned invoice, a photographed receipt or a PDF made from a fax is just pixels until OCR turns it into characters. For a business buyer it is the quiet first step behind invoice processing, contract search and any assistant that answers questions from paper records.

## How it works

OCR finds regions of an image that contain text, works out the reading order, and recognises each character or word. Modern OCR engines use [computer vision](https://aibuildindex.com/glossary/computer-vision) models rather than character templates, so they cope better with varied fonts and skewed scans. Many also return layout information: where each word sits on the page, which lines form a table, and which text belongs to a heading.

A typical build chains several steps. An invoice arrives by email, OCR extracts the text and layout, a [data extraction](https://aibuildindex.com/glossary/data-extraction) step pulls supplier, date, total and line items into fields, and validation checks that the line items add up before anything is posted to the accounts system. Some multimodal language models can now read images directly, which blurs the line between OCR and extraction, but a dedicated OCR pass is still common when documents are long or volumes are high.

## What it means for cost

The OCR call is usually a small share of the budget. The work that moves a quote is:

- **Input quality.** Clean digital PDFs need little or no OCR; low-resolution scans, phone photos and handwriting need pre-processing and more testing.
- **Tables and layout.** Reading a paragraph is easy. Reading a multi-page table with merged cells is not, and errors there break downstream totals.
- **Variety.** Ten supplier formats behave very differently from a thousand.
- **Review.** Any build where a misread number causes a wrong payment needs a confidence threshold and a [human in the loop](https://aibuildindex.com/glossary/human-in-the-loop) for low-confidence pages.

Ask a builder to run a sample of your worst documents, not your best, before quoting. Live figures for builds of this kind are on the [document data extraction cost page](https://aibuildindex.com/cost/document-data-extraction).

## When it is the wrong tool

If documents already arrive as digital PDFs with a text layer, or the data exists in a system with an [API](https://aibuildindex.com/glossary/api), OCR adds error for no gain. Read the text layer or call the system directly instead.

## Common questions

### Is OCR the same as intelligent document processing?

No. OCR only turns images into text. [Intelligent document processing](https://aibuildindex.com/glossary/intelligent-document-processing) is the wider pipeline that classifies documents, extracts specific fields, validates them and routes exceptions, with OCR as one stage.

### Can OCR read handwriting?

Some engines handle neat handwriting reasonably well, but accuracy is noticeably lower than for print and varies by writer. Builds that depend on handwritten forms should plan for human review of uncertain fields.

### Does OCR work in languages other than English?

Most major OCR engines support many languages and scripts, though accuracy differs between them. Right-to-left scripts, mixed-language pages and unusual fonts deserve their own test set.

## Related terms

- [Intelligent document processing (IDP)](https://aibuildindex.com/glossary/intelligent-document-processing): Intelligent document processing is the automated reading of business documents such as invoices, forms and contracts, combining OCR, layout analysis and language models to turn them into checked, structured data that other systems can use.
- [Data extraction](https://aibuildindex.com/glossary/data-extraction): Data extraction is the process of pulling specific fields or records out of unstructured or semi-structured sources, such as documents, emails, web pages or transcripts, and returning them in a consistent, structured format.
- [Computer vision](https://aibuildindex.com/glossary/computer-vision): Computer vision is the field of AI that lets software interpret images and video, for tasks such as detecting objects, counting items, reading text, inspecting defects or recognising what a scene contains.
- [Retrieval-augmented generation (RAG)](https://aibuildindex.com/glossary/retrieval-augmented-generation): Retrieval-augmented generation is a way of answering questions with a language model that first looks up relevant passages in your own documents, then writes an answer grounded in what it found.
- [Named entity recognition (NER)](https://aibuildindex.com/glossary/named-entity-recognition): Named entity recognition is a natural language processing technique that finds and labels specific items in text, such as people, companies, places, dates, amounts and product codes, so they can be extracted, linked or redacted.
