presentsUNAIVERSE
The UN AI timeline

Learn AI /Computer Vision and Language Technology /Optical character recognition

Optical character recognitionOCR

Also called: OCR, text extraction.

Detail

In five seconds

What it is

A method that turns words in an image or scanned page into machine-readable text that software can search, copy and analyse.

In plain words

OCR changes a picture of writing into text that software can search and copy.

An everyday example

A city office receives phone photos of printed notices from different buildings. A clerk looks at each photo, finds the text area, mentally straightens the tilted image, and retypes the words into a searchable spreadsheet. Later, the team can sort the messages by words like “urgent” or “meeting”. The clerk is not judging whether the notice is true or important yet, only converting what is visible into editable text.

Where the story stops working

A human clerk can use broad world knowledge, guess missing letters from context, and handle unusual layouts with little explanation. OCR systems do not work like a person retyping. They rely on trained pattern-matching and image-processing methods, and they can fail badly on blur, handwriting, mixed scripts, or rare fonts even when the general topic seems obvious to a human.

Remember thisOCR converts visible writing into searchable, editable text. It does not establish that the text is correct, authoritative or understood, so important output must be checked against the image.

Understand it

Understand it

Why it matters

Many important documents are trapped inside images: scans, photos, old PDFs, forms, signs, and archives. Without OCR, a computer cannot easily search or reuse that writing. With OCR, organisations can find information faster, reduce manual retyping, improve accessibility, and feed text into translation, search, or analysis tools. For non-specialists, the key decision point is reliability. OCR can save time, but mistakes matter when dates, names, case numbers, medicine labels, or legal wording are involved. You may need human checking, especially for poor-quality scans, handwriting, uncommon scripts, or low-resource languages. Knowing what OCR can and cannot do helps you choose the right workflow and the right level of review.

How OCR turns a page image into searchable text

After viewing this, a reader should be able to describe OCR as a multi-step process from image input to text output, and explain that recognising letters is different from understanding meaning.

  1. 01

    1. Image input

    A page arrives as a scan, photo, or image-only PDF. At this stage, the computer has pixels, not editable text.

    Show a document thumbnail with a folded corner and faint text lines. Add a small label: scan/photo/PDF image.

  2. 02

    2. Prepare and locate text

    The system may straighten the page, improve contrast, and mark where lines or words appear.

    Show the same page slightly straightened with highlighted rectangles over text lines. Include a small tilt-correction icon.

  3. 03

    3. Recognise characters

    Inside those text regions, the system predicts letters, numbers, and symbols based on their shapes.

    Zoom into one highlighted word and show image letters transforming into typed characters, with a few confidence dots above them.

  4. 04

    4. Output usable text

    The result becomes searchable, copyable text, sometimes with position data so each word can be linked back to its place on the page.

    Show plain text in a search box and a cursor selecting words, plus a small overlay linking text back to page locations.

A left-to-right flow diagram with four boxes connected by arrows. It starts with a photographed or scanned page, then shows text regions being found, then character recognition, then machine-readable text ready for search or later language tasks. Read from left to right.

Hovering over each stage reveals one example: a tilted receipt image, detected text boxes, recognised word, and final searchable text. Keyboard focus moves through the same stages in order.

Describe this without the diagram

The diagram explains OCR in four connected stages. First, a document exists only as an image made of pixels, such as a scan or photo. Second, the system prepares the image and marks where text appears, for example by straightening the page and finding text lines. Third, it recognises characters within those marked regions and converts their shapes into letters, numbers, and symbols. Fourth, it outputs machine-readable text that can be searched, copied, or passed to later language tools. The key point is that OCR changes visible writing into text data; understanding the meaning is a separate task.

With reduced motion: A static four-panel flow replaces animation. Each panel shows one stage with arrows between them: image input, text location and cleanup, character recognition, and searchable text output.

Optical character recognition, or OCR, takes an image that contains writing and converts the visible letters and numbers into digital text. The input might be a scanned paper form, a photo of a street sign, or a PDF that is really just page images.

A typical OCR system first looks for where text appears in the image. It may straighten the page, improve contrast, and separate lines or words from the background. Then it predicts which characters are present. A character is a single letter, number, or symbol.

The output is text data, often with information about where each word was found on the page. That means people can search the document, copy a sentence, translate it, or send the text into other software such as summarisation or named entity recognition.

OCR is often confused with reading meaning. OCR mainly converts shapes of letters into text. Understanding what the text means is usually a later step handled by language tools. OCR quality also depends heavily on image quality, handwriting style, font, script, and whether the language is well supported.

How “A clerk retyping notices from photos” maps onto the real thing

In the storyIn the AI system
phone photos of printed noticesimages or scans used as OCR input
the clerk finds the text areatext detection in the image
mentally straightening the tilted imagepreprocessing such as deskewing and contrast adjustment
retyping words into a spreadsheetconverting character shapes into machine-readable text
sorting later by words like “urgent”downstream text analysis after OCR

A worked example

A conference services assistant in Dakar receives an image-only scan of text tabled during informals and needs a searchable working copy before the first reading.

Starting from: Scanned line: “Requests the secretariat to report on implementation.”

  1. The OCR system receives the scanned page and identifies the region containing text.
  2. Preprocessing straightens the page and improves contrast between the letters and background.
  3. The system groups the detected text into a line and predicts the character sequence.
  4. It outputs editable text with location data and confidence scores, allowing low-confidence words to be checked against the scan.

Result: Working text: “Requests the secretariat to report on implementation.” The assistant can search and copy it, but compares it with the tabled scan before circulation because OCR output is not the authoritative text.

In a United Nations workplace

A security analyst in a regional bureau is finalising a note for the file following a bilateral. The written points provided at the meeting are available only as an image-only scan, so the analyst uses approved OCR software to extract passages for searching and quotation.

OCR detects the text regions, recognises the character sequences and produces editable text, often with confidence scores and word positions. This saves retyping, but the scan remains the source against which quotations and names must be checked before clearance.

Before you try thisThe written points may be security-sensitive. They must not be uploaded to a public or otherwise unapproved service. Use only a system approved for that information, apply the relevant access controls, and verify every quoted passage against the scan because OCR can silently misread names, numbers and punctuation.

Where you may hear it

  • At a vendor demonstration for a procurement unit
  • During an archive digitisation planning meeting
  • When a desk officer cannot search an image-only PDF
  • In a conference room while converting tabled scans into working text
  • At an ICT governance board reviewing document-processing tools

Avoid confusion

Avoid confusion

Often confused with

Common misconceptions

  • Common misconception: OCR understands the meaning of a document.

    Correction: OCR usually focuses on turning visible characters into text. Understanding topic, sentiment, entities, or instructions is a separate language task that may happen afterwards. A system can copy the words correctly and still not interpret them well.

  • Common misconception: If text looks clear to a person, OCR will always get it right.

    Correction: People use context and background knowledge to fill gaps. OCR depends on image quality, script support, layout, font, blur, shadows, and training data. It may confuse similar shapes such as 0 and O or miss text in a complex table.

  • Common misconception: OCR only works on printed paper documents.

    Correction: Printed scans are common, but OCR is also used on photos, screenshots, signs, labels, and image-only PDFs. Handwriting can sometimes be processed too, but that is often harder and less accurate than clean printed text.

Quick check

What does OCR mainly produce from a scanned page?

Go deeper

Go deeper

The simple version

OCR changes a picture of writing into text that software can search and copy.

The technical version

OCR is a pipeline that converts text-bearing images into structured text output. It often includes image preprocessing, text detection or segmentation, line and word grouping, and character or sequence recognition. Older systems relied more on hand-engineered image features and character templates. Many modern systems use machine learning to detect text regions and predict character sequences directly from image patches or text lines. The output may include recognised text, confidence scores, and coordinates for each line or word. OCR should be distinguished from speech-to-text, which converts audio rather than images, and from later natural language processing steps that interpret the extracted text.

Reviewed external resources

Where this came from

Drafted with a language model through an offline pipeline, checked against this site's schema, and every external link above fetched to see whether it answers. Treat it as a starting point and check anything that matters against the primary sources. How this site is built and what that means.

The one thing to remember

OCR converts visible writing into searchable, editable text. It does not establish that the text is correct, authoritative or understood, so important output must be checked against the image.