โ† All guides ยท September 4, 2026

Image Preprocessing for Better OCR Results

OCR reads what you give it, so the cleaner the image, the cleaner the text. A little preprocessing, cropping, straightening, boosting contrast, often does more for accuracy than any setting inside the tool. Here is what to do, and roughly in what order.

Start with the capture

The cheapest preprocessing is getting the original shot right, because no edit recovers detail that was never captured.

  • Light it evenly. Avoid harsh shadows and glare; flat, diffuse light is ideal.
  • Hold steady and focus. Motion blur and soft focus are the hardest problems to fix later.
  • Shoot straight on. Photograph the page flat rather than at an angle.

If you can re-take a poor image, that beats every software trick below.

The cleanup steps that matter

Once you have the best image you can get, a short editing pass sharpens the read:

  1. Crop tight. Remove backgrounds, edges, and anything that is not the text you want. This focuses the engine and cuts noise.
  2. Straighten (deskew). Rotate the image so lines of text run horizontally. Tilt confuses line detection more than people expect.
  3. Increase contrast. Push the text toward dark and the background toward light. Pale gray text on a busy field is a common accuracy killer.
  4. Convert to grayscale for plain printed text. Color rarely helps OCR and can introduce distractions.
  5. Remove obvious noise, such as speckles from an old scan, while being careful not to erase thin strokes.

Do not overdo it: aggressive sharpening or heavy thresholding can chew up letter edges and make things worse. The goal is a clean, high-contrast image, not a heavily processed one.

Resolution and format

Give the engine enough pixels to work with. Small, low-resolution text is hard to read; a reasonably high-resolution capture of the text region helps. For specifics, see what image resolution you need for OCR. Save in a format that preserves detail, our which image formats work best for OCR guide covers the trade-offs, and avoid re-compressing an image repeatedly.

When you are ready to convert

After cleanup, run the image through our free image to text tool. For camera shots specifically, photo to text is a good fit, and screenshots go through screenshot to text cleanly since they are already crisp.

Keep expectations realistic

Preprocessing improves your odds; it does not guarantee perfection. Even a well-prepared image can produce the occasional misread, so proofread the output, especially numbers and names. And if an image is fundamentally too blurry or dark, see can OCR read blurry images for what is realistic before you spend time editing a lost cause.

Common questions

What is the single most useful preprocessing step?

Usually cropping and straightening. Focusing the engine on just the text, with lines running horizontally, removes a lot of confusion in one move.

Should I always convert to black and white?

Grayscale or clean black-and-white helps for plain printed text. But avoid harsh thresholding that eats thin strokes; the aim is clarity, not extremes.

Can preprocessing fix a blurry photo?

Only mildly. Sharpening recovers a little, but it cannot replace detail the blur destroyed. A fresh, in-focus capture is far more effective.

Clean it up, then convert

Spend two minutes cropping, straightening, and boosting contrast, then drop your image into our free image to text converter, no sign-up needed, with files deleted automatically after processing. The cleaner the input, the less you will have to fix afterward.

Try it now

Extract text from any image or PDF โ€” free, no sign-up.

Open the converter