image-tools 5 min read

Image to Text: How OCR Works and Why Accuracy Varies So Much

Published: June 16, 2026
Open book with text visible on the pages

Keyword target: “image to text online free” — 200K+ monthly searches. Most results are tool pages with no explanation of how OCR works or why it fails. Users who get bad results from one tool have no guidance on why or how to improve. Significant content gap.


Every OCR tool you have used — on your phone, in Adobe, online — is making thousands of guesses per second. It is looking at groups of pixels, asking “does this pattern look more like an ‘a’ or an ‘o’?”, and committing to an answer. The accuracy you see is the product of how well the model was trained, how clean the input image is, and whether the tool was designed for the type of document you gave it.

This matters because free online OCR tools give results ranging from perfect to completely unusable on similar inputs, and most people assume that means one tool is “better” — without understanding that the image itself usually determines the outcome more than the tool does.

How OCR actually works

Modern OCR — optical character recognition — uses neural networks trained on millions of labeled character images. Tesseract, the most widely used open-source OCR engine (originally developed by Hewlett-Packard in the 1980s, now maintained by Google), uses an LSTM (Long Short-Term Memory) neural network that processes text in lines rather than character-by-character.

The pipeline looks like this:

Image preprocessing: The raw image is converted to grayscale, contrast is normalized, and noise is reduced. Some implementations apply adaptive thresholding — converting the image to pure black and white based on local pixel neighborhoods rather than a single global threshold. This step significantly affects accuracy on photos taken in variable lighting.

Layout analysis: The engine identifies text regions, separates them from images and decorative elements, determines reading order, and identifies individual text lines. For a simple document with one column of text, this is straightforward. For a newspaper layout, a form, or a table, it becomes complex.

Line recognition: Within each identified text line, the LSTM network processes the sequence of pixel columns and produces character probabilities. It considers the context of surrounding characters — knowing that “tbe” is probably “the” based on the probability that ‘b’ and ‘h’ look similar in the input.

Post-processing: The raw character output is optionally filtered through a dictionary and language model to correct probable errors. “Tbe quick brown fox” becomes “The quick brown fox” through this stage.

Tesseract specifically supports over 100 languages, each requiring a separately trained model. Accuracy varies significantly between languages because training data availability varies — English has enormous training datasets; less common languages have much smaller ones.

Why accuracy varies so dramatically

The same Tesseract engine processing two different images of text can produce near-perfect results on one and complete gibberish on the other. The variables responsible:

Resolution. This is the biggest factor. Tesseract’s documentation recommends a minimum of 300 DPI for reliable recognition. An image captured at 72 DPI (typical screen screenshot resolution) has less than one-quarter the pixel density. Characters that appear readable to human eyes at low resolution — because our visual system interpolates and uses context — become ambiguous to a character classifier. The classifier sees pixels, not meaning.

A practical test: take a photo of printed text with your phone held at normal reading distance. Then take the same photo from twice as far away. OCR accuracy typically degrades significantly on the second image because the text occupies fewer pixels.

Image skew. Text that is tilted — even 2-3 degrees — disrupts line detection. Scanned documents that were placed slightly crooked on the scanner, photos of documents taken at an angle, or photographed pages that curve away from the camera all introduce skew. Some OCR tools automatically deskew before recognition; others do not. If you see lines of text being merged or split incorrectly in your OCR output, skew is usually the cause.

Contrast and lighting. OCR requires clear separation between dark text and light background. Photographs taken in uneven lighting — one side of a page in shadow — create regions where text contrast is insufficient for reliable recognition. Glossy paper reflects light unevenly. Colored backgrounds reduce contrast for colored text.

Font complexity. OCR performs best on clearly printed, standard fonts — the kind used in printed books and typed documents. Handwriting is dramatically harder and requires specialized handwriting recognition models (HTR) rather than standard OCR. Decorative fonts, overlapping letters, and unusual letter forms reduce accuracy. Script fonts — where letters connect — are particularly challenging because the boundary between characters is ambiguous.

Document type. A printed book page with uniform text is easier than a form with tables, checkboxes, and mixed orientations. A receipt with thin, low-contrast thermal printing is harder than a laser-printed invoice. A photo of a whiteboard with marker writing is harder than a scanned document.

How TinyTransform’s OCR works

TinyTransform’s Image to Text tool uses Tesseract.js — a JavaScript port of Tesseract 4.x compiled to WebAssembly. This runs entirely in your browser.

When you drop an image, the tool:

  1. Downloads the language recognition model (~10MB for English) to your browser’s cache on first use — subsequent uses are instant
  2. Passes the image to Tesseract.js running in a Web Worker so processing does not block the browser UI
  3. Receives progress events from Tesseract (which we display in the progress bar) as it processes layout analysis and line recognition
  4. Returns the full text output along with a confidence score

The confidence score is an aggregate of per-character confidence values. A confidence of 90%+ indicates the engine is highly certain about its output. A confidence below 60% indicates significant uncertainty — you should review the output carefully.

Language support: English, Spanish, French, German, Arabic, Chinese Simplified, Hindi, Portuguese, Russian, Japanese. Select the correct language for dramatically better results — running English recognition on French text will produce plausible-looking but incorrect output because the language model is optimizing for English character sequences.

Practical techniques to improve OCR accuracy

Increase resolution before processing. If you have a low-resolution image of text, use the Resize Image tool to upscale it before running OCR. Bicubic interpolation (which canvas resize uses) adds pixels by interpolating between existing values. This does not recover lost information, but it does give the OCR engine more pixels to work with and can improve accuracy on borderline-resolution inputs.

Convert to high-contrast before processing. For photos taken in uneven lighting, manually adjust contrast in an image editor before running OCR. You want the text as dark as possible and the background as light as possible.

Crop to the text region. If your image contains a small block of text in a larger photograph — a product label, a sign in a photo, a nameplate — crop to just the text region before processing. Layout analysis performs better when the entire image is text rather than text within a larger scene.

Use the correct language. Every language selection loads a different recognition model trained on text in that language. Selecting the correct language is one of the easiest ways to improve accuracy on non-English text.

Photograph documents flat. For documents, a flatbed scanner produces better OCR results than a phone camera because it captures the document at uniform distance and lighting. If you are photographing a document with your phone, place it on a flat surface, use the highest resolution setting, and ensure even lighting with no shadows.

What OCR cannot do well

Handwriting — standard Tesseract models are not trained for handwriting recognition. You may get some words recognized correctly by coincidence, but systematic handwriting OCR requires specialized models. Some cloud OCR services (Google Vision API, Microsoft Azure Computer Vision) have dedicated handwriting recognition models that perform substantially better.

Mathematical formulas — standard OCR treats math as text and produces meaningless character strings. Specialized math OCR tools (Mathpix is the best-known) use models trained specifically on mathematical notation.

Tables — Tesseract can recognize the text within table cells, but it does not understand table structure. The output will be the text content without the spatial organization. If you need to extract data from a table in a PDF, PDF to Text may give better structured results for text-based PDFs.

Low-quality scans — faded ink, stained paper, heavy image artifacts from JPEG compression — all reduce accuracy significantly. There is a floor below which no OCR tool performs reliably because the input data is genuinely ambiguous.

When to use OCR and when not to

OCR is the right tool when: you have a photograph or scan of printed text and need the text in editable form. Common use cases: digitizing printed notes, extracting text from screenshots, converting scanned documents to searchable text, reading text in images you did not create.

OCR is not the right tool when: you have a PDF that was created digitally. A digitally created PDF stores actual text data — you can select it and copy it in any PDF reader. Use PDF to Text to extract it directly, which is faster and 100% accurate. Reserve OCR for images and scanned PDFs where no text layer exists.

Enjoyed this guide? Share with others: