IImageToolKit

How to Extract Text From an Image (OCR) — A Practical Guide

OCR — optical character recognition — converts the pixels of letters into actual characters you can copy, search and edit. It is remarkably good on clean input and unreliable on messy input. Here is how to stay on the good side of that line.

What OCR handles well

What it struggles with

How to get better results

  1. Start with the highest-resolution version you have. Do not OCR a compressed thumbnail if the original exists.
  2. Straighten it. If the page is rotated or skewed, fix that first.
  3. Increase contrast. A scan at 300 DPI in black and white beats a colour photo every time.
  4. Crop to the text. Borders, backgrounds and other objects add noise.
  5. Enlarge small text. If the text is under 12 px tall, upscaling 2–3× before recognition often helps.
  6. Proofread numbers. OCR commonly confuses 0/O, 1/l/I, 5/S and 8/B. Any figure you will act on deserves a manual check.

A note on file formats

OCR engines read pixels, not file extensions. PNG is the safest input for screenshots because it has no compression artefacts around letter edges; a heavily compressed JPG can smear small glyphs and cost you accuracy. If you have a JPG, use the highest quality version available.

Privacy: why run OCR in the browser?

The images people want to OCR are often the most sensitive ones: passports, bank statements, contracts, medical letters, payslips. Uploading those to a free online OCR service means trusting a stranger's server with them — and you usually have no way to know how long they keep the file.

Running the recognition locally avoids the question entirely. The engine downloads once, the image stays in memory, and the text appears on your screen. Nothing is transmitted, nothing is stored.

When text cannot be selected in a PDF

A "flat" PDF is just pictures of pages — there is no text layer to copy. OCR is the fix: convert the pages to images, recognise them, and you have selectable text. For a born-digital PDF, on the other hand, you do not need OCR at all — the text is already in the file and can be extracted directly.

Try it now: Image to Text · Compress Image