AI GLOSSARY · AI CONCEPTS

Optical character recognition (OCR)

Markdown version · Wikidata Q167555

Definition

Optical character recognition (OCR) is technology that converts images of text, such as scans, photos and image-only PDFs, into machine-readable text that can be searched, copied and edited.

Also called: OCR, OCR AI, what is OCR, OCR software.

In plain language

An image-only scan contains pictures of letters rather than extractable characters. OCR recognizes those pictures and produces machine-readable text. A scanned PDF may already contain a hidden OCR text layer, so check before running recognition again. Output can contain wrong digits or words, and extracted tables may lose structure. Compare important values with the page image; readable-looking output is not proof of a faithful transcription.

Technical definition

OCR converts text images into machine-readable characters. Systems may preprocess an image, recognize text and return positions or structure; implementation steps vary. Google's Vision API distinguishes general TEXT_DETECTION from document-oriented DOCUMENT_TEXT_DETECTION, which returns page, block, paragraph, word and break information. Recognition and extracting an existing PDF text layer are different operations. Neither a searchable text layer nor layout annotations guarantee an editable reconstruction of the original document.

Worked examples in this catalogue

Catalogue examples point at a skill, guide or coding tool listed on this site, with what to run and what you see. An example marked illustrative describes the item from its own documentation; it was not executed for this page. Platform Scores are our assessment under a published method, not a safety guarantee.

  1. Skill by Anthropic · Illustrative, not executed

    pdf 28/100 · Provisional, not yet measuredScored · Method v0.2 · How we score

    What you see
    A PDF read, merged, split, filled, created and OCRed, as the skill's own description puts it.
    Why it exercises the concept
    It is the direct way to give a coding agent scanned PDFs, where OCR can make image-only page text available for extraction. An existing usable text layer may instead be extracted directly.
  2. Skill by Skill Almanac · Illustrative, not executed

    pdf-extraction-and-forms 57/100 · Provisional, not yet measuredScored · Method v0.2 · How we score

    What you see
    Text, tables and form fields taken in and out of PDFs with a triage script, a route table and read-back checks.
    Why it exercises the concept
    A triage script, a route table and read-back checks help handle PDFs that need OCR and catch bad extraction.
  3. Skill by Skill Almanac · Illustrative, not executed

    ocr-text-repair 57/100 · Provisional, not yet measuredScored · Method v0.2 · How we score

    What you see
    Broken OCR text repaired with a change log, fixing a misread only when the document itself proves the correct word.
    Why it exercises the concept
    OCR output contains misreads. This skill shows the repair step and keeps a log, so each correction can be reviewed.

How it shows up when you use agents

Many PDFs and images contain no text a program can read, only pictures of pages. When you hand one to Claude Code or another agent, the agent has to run OCR first or use a model that reads images, and what it gets back depends on the scan. The anthropic/pdf skill covers reading and OCRing PDFs, and pdf-extraction-and-forms adds a triage script that routes each file and read-back checks on the result.

The usual failure is silent. OCR returns text that looks plausible but has a swapped digit, a split word or a merged column, and the language model reasons from it as if it were right. A table can come back as a stream of numbers with its structure lost. This is also related to computer vision, since the input is an image.

What breaks when this is misunderstood: people ask an agent to summarise a scanned contract and trust figures that were misread upstream. The safer habit is to check which kind of PDF you have before extraction, spot-check numbers and names against the page image, and keep a log of repairs. ocr-text-repair fixes a misread only when the document itself proves the correct word and records each change. Next time, extract, then verify the five most important figures by eye before the agent builds on them.

Worked example (illustrative)

In a synthetic receipt example, OCR outputs 1O0.00. Do not automatically replace every letter O with zero: an item code may legitimately contain O. Compare the amount against the image, record a supported correction to 100.00, and retain unresolved cases. This is an illustrative transcription error, not an OCR engine run or accuracy benchmark.

Common confusions

  • OCR versus a PDF text layer. A PDF can contain native text, image-only scans, or scans with an existing OCR layer. Inspect the page before deciding whether to extract text, recognize it, or redo poor recognition.
  • OCR versus computer vision. OCR is one specific task, reading text from an image. Computer vision is the broader field of getting information from images.
  • OCR versus handwriting recognition. Printed text is the classic case. Google Cloud's Vision page lists handwriting extraction among the uses of its OCR features.
  • Myth. OCR output is always a faithful copy. Recognition and PDF extraction can both introduce errors. Measure a named system on representative documents rather than promise universal accuracy.

Terms that mention Optical character recognition (OCR)

4 terms mention this one

More in AI concepts

Next steps

  1. pdf A skill that exercises it.
  2. Computer vision Related term.
  3. Multimodal AI Related term.
  4. All glossary terms A to Z and by family.

Sources

Definitions are written by Skill Almanac from these sources and were checked against them on 2026-11-24. Wikipedia is never the only source.

Review record

Last verified

Drafted by Claude (original draft) and Codex (automated revisions); sources and example targets checked by Independent automated source review (OpenAI Codex); not human peer review on 2026-11-24. Last verified .

Change log (5)
  • : Independent automated factual/example review completed. Cached US query estimate aligned to receipt; no traffic promise. Final technical gate recorded separately; publication disabled.
  • : First version.
  • : Verifier pass: applied verifier corrections (unsourced claims dropped or softened, attributions tightened).
  • : Distinguished image-only scans and existing text layers; removed universal accuracy implication; qualified OCR pipeline/layout scope; peer review pending.
  • : Automated review completed; approved for the staged public release. Search indexing is controlled by the release configuration.