Skip to content

How to Improve OCR Accuracy: Practical Fixes for Photos, Screenshots and Scans

OCR accuracy depends mostly on the image you give it. If the letters are large enough in pixels, sharp, level, evenly lit and set in the language you selected, a modern OCR engine will usually return clean text. When results are poor, the cause is almost always one of a handful of image or setup problems, and each one has a specific fix.

This guide explains what each problem does to text recognition, how to fix it before or after you take the picture, and how to check the output so mistakes do not slip through. It also includes results from a small, reproducible test that shows how much each problem changed the output of the Tesseract OCR engine.

On this page
  1. What affects OCR accuracy?
  2. What breaks OCR: results from a controlled test
  3. How to capture an image that OCR can read
  4. How to set up the OCR run
  5. Handwriting: what helps
  6. Troubleshooting OCR errors by symptom
  7. What to do when OCR keeps failing
  8. How to check and correct OCR output
  9. Should you edit the image before OCR?
  10. Frequently asked questions
  11. Try it on your own image

What affects OCR accuracy?

Optical character recognition (OCR) converts pictures of text into characters you can edit and search. The engine first finds blocks and lines of text, then recognizes the characters in each line, and finally uses a language model to pick the most likely words. Accuracy is usually measured as the character error rate (CER), the share of characters that are wrong, missing or added compared with the original text. A word error rate (WER) counts whole words instead, so a single wrong letter makes the whole word wrong.

QuickImageToText runs Tesseract, an open-source OCR engine, inside your browser. Since version 4, Tesseract has used an LSTM neural network that reads a whole line at a time (how image to text works). That design explains why line problems, such as tilted lines, a shadow covering half a line or text cut off at the edge, cause more damage than a single smudged letter.

Most errors come from three places:

  • The image: text too small, blurry, tilted, unevenly lit, low in contrast or heavily compressed.
  • The settings: the wrong language selected, or a layout (tables, columns) the engine reads in the wrong order.
  • The text itself: cursive handwriting, decorative fonts, damaged paper or very unusual characters.

Image problems are the most common and the easiest to fix, so they get most of the attention below.

What breaks OCR: results from a controlled test

To show how much each problem matters, a clean four-line text image was degraded one problem at a time and read with Tesseract 5.3.4 using default settings and the English model, with no cleanup applied. The text included an invoice number, a date, an email address, a phone number and a dollar amount, because those are the details people most often copy from images. The table shows the character error rate for each version.

ConditionCharacter error rateWhat happened
Clean image, x-height about 19 px0%Every character correct
Very small text, x-height about 5 px23.2%"Invoice" became "Invoke", the date was lost
Same small text, enlarged 3x before OCR7.2%Better, but detail that was never captured stayed lost
Slightly larger small text, enlarged 3x0%Enlarging worked when the letters were still distinct
Tilted 3 to 4 degrees0% to 0.5%Almost no effect
Tilted 5 degrees60.8%Lines broke apart and words were dropped
Tilted 15 degrees100%No text returned
Tilted 15 degrees, then straightened0%Fully recovered
Shadow darkening the right side40.2%The right half of every line was missing
Same shadow, global black-and-white40.2%No improvement
Same shadow, adaptive black-and-white1.5%Recovered, with two small slips
Strong blur36.6%Most words garbled
Strong blur, then sharpened10.3%Readable, but "$1,280.50" became "$1,280.99"
Small text saved as PNG2.1%"modern" read as "modem"
Same text, JPEG quality 503.6%Extra punctuation errors
Same text, JPEG quality 107.2%"due" became "die", "form" became "fotm"
Same text, JPEG quality 533.0%Email and phone number unusable
Faint gray text on white0%No effect on clean digital text
Light text on a dark background0%No effect on clean digital text
Cropped tight with no margin, or with a dark scanner border0%No effect in this test

How to capture an image that OCR can read

The most reliable fix is a better original. Editing can rescue a weak image, but it cannot restore detail the camera or scanner never recorded.

Make the text large enough in pixels

Small text is the most common cause of poor OCR, and the measure that matters is the height of the letters in pixels, not the file's megapixels. A 12-megapixel photo of a whole desk can still contain receipt text only a few pixels tall.

Tesseract's documentation says the engine works best on images of at least 300 dpi. Community testing summarized in the EasyRPA OCR tuning guide found Tesseract's LSTM engine reads best when lowercase letters (the x-height) are roughly 20 to 30 pixels tall. Microsoft's Read OCR model sets a minimum text height of 12 pixels for a 1024 x 768 image, about 8-point text at 150 dpi. Different engines have different limits, so treat these numbers as a guide rather than a rule.

How to get there:

  • Scanner: use 300 dpi for normal printed text and 400 to 600 dpi for small print, which matches the guidance in IBM's OCR best practices.
  • Phone camera: move closer until the text fills most of the frame. If the phone has a 2x or 3x lens, use it; digital zoom only crops and enlarges pixels you already have.
  • Screenshots: zoom the page or document to 100% or more before you capture it, rather than enlarging a small screenshot later. Our guide to copying text from a screenshot covers the shortcuts on each device.
  • Long documents: photograph one page, or half a page, at a time rather than a whole spread.

Enlarging an image afterwards helps only when the letters are still distinct. In the test above, enlarging slightly small text brought errors to zero, while enlarging text that was too small reduced errors but did not remove them. QuickImageToText automatically upscales small text to roughly the equivalent of 300 dpi before reading it, so the more useful step is capturing the text larger in the first place.

Keep the text sharp

Blur makes neighboring letters run together, so "rn" turns into "m" and "cl" turns into "d". Tap the text on the screen to focus, hold the phone with both hands or rest it on something, and add light: in dim rooms the camera uses a slower shutter, which adds motion blur.

Sharpening can partly rescue a soft image. In the test it cut errors from 36.6% to 10.3%, but it also changed a digit in a price. If the text matters, retake the photo instead of relying on sharpening.

Shoot straight and keep the page flat

Tesseract's documentation advises rotating the page so that text lines are horizontal, and the test shows why: lines tilted by 5 degrees or more broke apart. QuickImageToText straightens pages tilted by up to about 15 degrees and rotates sideways images upright automatically. For a steeper tilt, rotate the photo in your phone's editor before uploading.

Two related problems are not fixed by straightening:

  • Perspective distortion: shooting at an angle makes the far end of the page smaller, so lines converge. Hold the phone parallel to the page, or use a document scanning mode such as the one in Apple Notes or Google Drive, which corrects perspective.
  • Curved pages: text near a book's spine bends. Press the book flat, photograph one page at a time, and keep the spine area out of the crop if you can.

Light the page evenly

A shadow from your hand or phone, or glare on glossy paper, can hide part of every line. In the test, a shadow darkening one side of the page removed the right half of each line from the output. Use bright, indirect light such as a window without direct sun, turn off the flash on glossy paper, and tilt the page slightly if you see a reflection.

If you cannot retake the photo, adaptive (local) black-and-white conversion helps because it judges each area of the page against its own surroundings. A single global threshold did not help at all in the test, because no one cutoff suited both the bright and the dark side. QuickImageToText evens out uneven shadows automatically and offers an optional black-and-white mode for faint or uneven scans.

Check contrast and color

OCR reads dark text on a light background most reliably. IBM notes that light-colored or gray text may be recognized poorly or not at all, which matters for faded receipts, pencil and colored headings.

  • For faded print, increase contrast or use the black-and-white mode.
  • For dark-mode screenshots, light text on a dark background was read correctly in the test, and QuickImageToText inverts it automatically. Tesseract's documentation still recommends dark text on a light background for version 4 and later, so invert the image if a dark-mode screenshot gives poor results.
  • For colored text on a colored background, a grayscale or black-and-white version often reads better.
  • For thin paper where text from the back shows through, put a sheet of black paper behind the page before scanning.

Crop out clutter, but leave a margin

Fingers, the edge of the table, the next page and background patterns can all be read as stray characters. Crop to the page or the block of text you need. Leave a small white margin around it, because Tesseract's documentation notes that text with no border at all can cause problems, while very large borders around a single word can too.

Use a format that keeps detail

PNG is lossless, so it keeps letter edges exactly. JPEG is lossy: Google's Cloud Vision documentation warns that reducing the file size of lossy formats can degrade image quality and OCR accuracy. In the test, light JPEG compression made little difference, but heavy compression ruined the email address and phone number.

  • Phone photos saved as high-quality JPEG or HEIC are fine. QuickImageToText accepts JPG, PNG, GIF, BMP, WebP, TIFF, HEIC and HEIF directly, so there is no need to convert them first.
  • Avoid re-saving a JPEG several times, and avoid sending photos through messaging apps that compress them before you run OCR.
  • For screenshots and scans of digital documents, use PNG.

How to set up the OCR run

Select the correct language

The recognition model and its word list are specific to each language, so the wrong choice produces misspellings and random symbols even from a perfect image. QuickImageToText supports 19 languages and can auto-detect the writing system. For a document that mixes languages, such as English with Urdu or French, select each language that appears (up to three) rather than running the image several times.

Use the tool that matches the content

Expect plain text from tables and columns

OCR returns text in reading order, and complex layouts can come out jumbled. Tesseract's documentation states that it has trouble with tables unless the layout is analyzed separately. QuickImageToText returns plain text and does not keep tables, columns or formatting.

To get usable results from a table or a multi-column page:

  1. Crop each column, or the table, into a separate image.
  2. Run OCR on each crop.
  3. Paste the text into your document or spreadsheet and rebuild the layout there.

Handwriting: what helps

Handwriting is harder than print because every writer forms letters differently, and joined cursive removes the gaps OCR uses to separate letters. Clear block capitals or neat print in dark ink on plain paper give the best results, with space between words and lines. Photograph the page flat and evenly lit, the same as printed text, and expect to correct more words. Our guide to converting handwriting to text covers this in detail.

Troubleshooting OCR errors by symptom

Match what you see in the output to the likely cause, then try the fix in the last column.

SymptomLikely causeWhat to try
Random symbols or nonsense wordsWrong language selected, or text far too smallSelect the correct language; retake the photo closer
Right side or end of lines missingShadow, glare or a tilt of more than a few degreesRetake in even light, straight above the page; check for tilt
No text returned at allVery small, blurry or steeply tilted textCrop to the text, rotate it level, retake closer and in focus
Look-alike swaps (0 and O, 1 and l, rn and m, 5 and S)Small or soft lettersCapture the text larger; proofread these characters
Wrong digits in prices, dates or phone numbersBlur, heavy JPEG compression or sharpening artifactsUse the original photo or a PNG; check every number by eye
Words run together or split apartBlur or low resolutionMove closer, refocus, add light
Lines out of order or columns mixedMulti-column layout or a tableCrop each column or table and run them separately
Stray characters at the edgesFingers, background or the next page in the frameCrop to the text, leaving a small margin
Faded text skippedLow contrastUse the black-and-white mode or increase contrast
Poor results from a dark-mode screenshotColored or low-contrast text on dark backgroundInvert the colors or switch the app to light mode and capture again
Handwriting badly garbledJoined cursive or light pencilUse the handwriting tool; write in print with dark ink

What to do when OCR keeps failing

If you have tried the obvious fixes and the text is still wrong, work through these steps in order.

  1. Open the image at 100% zoom. If you cannot read the text easily, OCR will not either, so recapture it.
  2. Retake the photo or rescan rather than editing a weak image. Closer, sharper and evenly lit is worth more than any filter.
  3. Crop the part that fails and run it on its own. A clean paragraph often reads well once it is separated from a photo, logo or table.
  4. Turn on black-and-white mode for faint, yellowed or unevenly lit paper.
  5. Check the language setting, including every language in a mixed document.
  6. Look for a better source: a PDF with a text layer, a higher-resolution export or the original document.
  7. Type the remaining parts by hand. Damaged paper, stylized fonts and some cursive will not reach full accuracy with any engine; our article on whether OCR can be 100% accurate explains why.

How to check and correct OCR output

Even good OCR makes mistakes, and they are easy to miss because they look like real words. Check the output before you rely on it.

  • Watch the confidence warning. QuickImageToText shows a confidence score and warns when it is low, which usually means a retake will help more than editing.
  • Check the high-risk details first: numbers, prices, dates, names, email addresses, URLs and reference codes. One wrong character makes them useless.
  • Compare with the image line by line for anything you will send, publish or pay.
  • Search for common swaps: 0 and O, 1, l and I, 5 and S, 8 and B, rn and m, cl and d, and missing decimal points or commas.
  • Run a spell check, but do not stop there. It flags non-words such as "moming" but not real words such as "modem" or a wrong digit.
  • Sanity-check data: totals should add up, dates should be valid and email addresses should have one @ and a real domain.

Should you edit the image before OCR?

Usually, a crop and a rotation are enough. Start with the lightest fix that addresses the problem you can see, because heavy filters can remove thin strokes, decimal points and accents. The table shows what each common adjustment does and whether QuickImageToText already applies it.

AdjustmentFixesPossible side effectApplied by QuickImageToText?
CropClutter, borders, other pagesCutting off letters if cropped too tightNo, do this yourself
Rotate or straightenTilted or sideways textSlight softening from resamplingYes, up to about 15 degrees
Enlarge (upscale)Small textCannot add detail that was never capturedYes, for small text
Contrast stretchFaint or gray textCan amplify noise and stainsYes
Black-and-white (thresholding)Faded print, uneven backgroundsCan erase thin strokes or break lettersOptional mode
Shadow correctionUneven lightingMay lighten faint text furtherYes
Invert colorsLight text on dark backgroundsNone on clean imagesYes
Noise removalSpeckles on old scans or faxesCan delete periods, commas and accentsNot stated
SharpeningSlight blurHalos and false strokes that change charactersNot stated

Frequently asked questions

What is the best resolution for OCR?

For scans, 300 dpi suits most printed text and 400 to 600 dpi suits very small print. What matters is the size of the letters in pixels: Tesseract tends to read best when lowercase letters are about 20 to 30 pixels tall. Going far beyond that adds file size without improving accuracy.

Is PNG or JPG better for OCR?

PNG is safer because it is lossless. A high-quality JPEG straight from a phone camera also works well; problems start when a JPEG is heavily compressed or re-saved, which blurs letter edges.

Can OCR read a blurry image?

Mild blur is usually fine. Strong blur merges letters, and sharpening only partly recovers them while sometimes changing characters. Retaking the photo is the reliable fix.

Does converting to black and white always improve OCR?

No. It helps with faded print and uneven backgrounds, especially adaptive (local) conversion, but it can erase thin strokes and small punctuation. Try it when text is faint, and compare the result with the original.

Why does OCR mix up 0 and O, or rn and m?

Those characters look almost the same, especially when the text is small or soft. The engine picks the most likely option, which can be wrong. Larger, sharper text reduces these swaps, and proofreading catches the rest.

Try it on your own image

Pick one image that gave you poor results, apply the fixes above, and compare the output. The QuickImageToText image to text converter runs in your browser, applies the automatic cleanup described in this guide, and lets you copy the text or download it as a .txt or .docx file.

Extract text from an image

Related posts

Back to the blog

Latest from Our Blog

Tips, guides, and insights on OCR technology

View All Posts

This tool in other languages