OCR stands for Optical Character Recognition — technology that identifies text within an image and converts it into machine-readable, editable text. It's the invisible engine behind document scanning apps, license plate readers, receipt-tracking software, and tools that turn a photo of a table into an actual spreadsheet.

How OCR works, step by step

1. Image preprocessing

Before any text recognition happens, the image is cleaned up. This typically includes converting to grayscale, increasing contrast, correcting skew (if the image was photographed at an angle), and removing noise or artifacts. Clean preprocessing dramatically improves accuracy in later steps.

2. Text detection (layout analysis)

The engine identifies which regions of the image actually contain text, distinguishing them from photos, logos, or blank space. It also determines the reading order — top to bottom, left to right for most Latin-script languages — and detects structural elements like columns, tables, and paragraphs.

3. Character segmentation

Detected text regions are broken down into individual lines, then words, then individual characters. This is trickier than it sounds — cursive or connected fonts, unusual spacing, and low resolution can all cause characters to be merged or split incorrectly.

4. Character recognition

Each isolated character shape is compared against patterns the OCR model has learned during training. Modern OCR engines use neural networks trained on millions of examples of printed and handwritten text, allowing them to recognize characters even with variations in font, size, and style.

5. Post-processing and correction

The raw recognized text is refined using dictionary lookups, language models, and contextual rules. For example, if the engine sees "teh" in a sentence, contextual correction might flag it as a likely OCR error for "the." This step significantly boosts real-world accuracy.

Why OCR sometimes gets it wrong

Even the best OCR engines make mistakes. Common causes include:

Practical tips for better OCR results

  1. Use screenshots instead of photos when possible. A direct screen capture is pixel-perfect; a photo of a screen introduces glare, moiré patterns, and angle distortion.
  2. Ensure good, even lighting for photographed documents — avoid shadows falling across the text.
  3. Keep the camera parallel to the page — angled shots distort character shapes and confuse segmentation.
  4. Crop tightly around the relevant text — removing unrelated background reduces noise the engine has to filter out.
  5. Higher resolution is generally better — but extremely large files can sometimes slow processing without meaningfully improving accuracy beyond a certain point.
  6. Print clearly for handwritten text — block capitals are recognized far more reliably than cursive.

Beyond plain text: structured data extraction

Modern OCR tools don't just output a wall of text — they can detect structure. When OCR identifies that text is arranged in a grid pattern (consistent rows and aligned columns), it can reconstruct that as an actual table rather than a jumble of words. This is what makes it possible to photograph a receipt and get back structured data — item names in one column, prices in another — rather than just a block of unformatted text.

This structural detection typically relies on analyzing the position of each recognized word (its x/y coordinates in the image), then clustering words that share similar horizontal positions into columns, and words on the same horizontal line into rows.

Where OCR is used today

See OCR in action

Upload any screenshot of a table, receipt, or invoice and get structured data back — as Excel, CSV, JSON, or plain text. Free, runs in your browser.

Try Screenshot to Document →

Free vs. paid OCR — what's the difference?

Open-source OCR engines (like Tesseract, which powers many free tools) are highly capable for standard printed text in good-quality images. Paid, cloud-based OCR services (from providers like Google Cloud Vision, AWS Textract, or Microsoft Azure) often perform better on messy real-world documents — handwriting, low-quality scans, and complex multi-language documents — because they use larger, more frequently updated models and can leverage more computing power.

For most everyday use cases — reading a clear screenshot, a printed receipt, or a typed document — free, browser-based OCR performs remarkably well and requires no account, no upload to third-party servers, and no cost.

Understanding how OCR works — and its genuine limitations — helps you get better results from it. Clean, well-lit, properly cropped images will consistently outperform blurry or awkwardly angled photos, regardless of which OCR engine you're using.