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
- What affects OCR accuracy?
- What breaks OCR: results from a controlled test
- How to capture an image that OCR can read
- How to set up the OCR run
- Handwriting: what helps
- Troubleshooting OCR errors by symptom
- What to do when OCR keeps failing
- How to check and correct OCR output
- Should you edit the image before OCR?
- Frequently asked questions
- 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.
| Condition | Character error rate | What happened |
|---|---|---|
| Clean image, x-height about 19 px | 0% | Every character correct |
| Very small text, x-height about 5 px | 23.2% | "Invoice" became "Invoke", the date was lost |
| Same small text, enlarged 3x before OCR | 7.2% | Better, but detail that was never captured stayed lost |
| Slightly larger small text, enlarged 3x | 0% | Enlarging worked when the letters were still distinct |
| Tilted 3 to 4 degrees | 0% to 0.5% | Almost no effect |
| Tilted 5 degrees | 60.8% | Lines broke apart and words were dropped |
| Tilted 15 degrees | 100% | No text returned |
| Tilted 15 degrees, then straightened | 0% | Fully recovered |
| Shadow darkening the right side | 40.2% | The right half of every line was missing |
| Same shadow, global black-and-white | 40.2% | No improvement |
| Same shadow, adaptive black-and-white | 1.5% | Recovered, with two small slips |
| Strong blur | 36.6% | Most words garbled |
| Strong blur, then sharpened | 10.3% | Readable, but "$1,280.50" became "$1,280.99" |
| Small text saved as PNG | 2.1% | "modern" read as "modem" |
| Same text, JPEG quality 50 | 3.6% | Extra punctuation errors |
| Same text, JPEG quality 10 | 7.2% | "due" became "die", "form" became "fotm" |
| Same text, JPEG quality 5 | 33.0% | Email and phone number unusable |
| Faint gray text on white | 0% | No effect on clean digital text |
| Light text on a dark background | 0% | No effect on clean digital text |
| Cropped tight with no margin, or with a dark scanner border | 0% | 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
- Phone photos and general images: the image to text converter.
- Screenshots: screenshot to text.
- Letters, forms and printed pages: document OCR.
- PDFs: PDF to text, which reads a PDF's existing text layer first and only runs OCR on scanned pages.
- Many images at once: multi-image OCR, up to 20 images per batch.
- Handwritten notes: handwriting to text.
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:
- Crop each column, or the table, into a separate image.
- Run OCR on each crop.
- 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.
| Symptom | Likely cause | What to try |
|---|---|---|
| Random symbols or nonsense words | Wrong language selected, or text far too small | Select the correct language; retake the photo closer |
| Right side or end of lines missing | Shadow, glare or a tilt of more than a few degrees | Retake in even light, straight above the page; check for tilt |
| No text returned at all | Very small, blurry or steeply tilted text | Crop 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 letters | Capture the text larger; proofread these characters |
| Wrong digits in prices, dates or phone numbers | Blur, heavy JPEG compression or sharpening artifacts | Use the original photo or a PNG; check every number by eye |
| Words run together or split apart | Blur or low resolution | Move closer, refocus, add light |
| Lines out of order or columns mixed | Multi-column layout or a table | Crop each column or table and run them separately |
| Stray characters at the edges | Fingers, background or the next page in the frame | Crop to the text, leaving a small margin |
| Faded text skipped | Low contrast | Use the black-and-white mode or increase contrast |
| Poor results from a dark-mode screenshot | Colored or low-contrast text on dark background | Invert the colors or switch the app to light mode and capture again |
| Handwriting badly garbled | Joined cursive or light pencil | Use 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.
- Open the image at 100% zoom. If you cannot read the text easily, OCR will not either, so recapture it.
- Retake the photo or rescan rather than editing a weak image. Closer, sharper and evenly lit is worth more than any filter.
- 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.
- Turn on black-and-white mode for faint, yellowed or unevenly lit paper.
- Check the language setting, including every language in a mixed document.
- Look for a better source: a PDF with a text layer, a higher-resolution export or the original document.
- 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.
| Adjustment | Fixes | Possible side effect | Applied by QuickImageToText? |
|---|---|---|---|
| Crop | Clutter, borders, other pages | Cutting off letters if cropped too tight | No, do this yourself |
| Rotate or straighten | Tilted or sideways text | Slight softening from resampling | Yes, up to about 15 degrees |
| Enlarge (upscale) | Small text | Cannot add detail that was never captured | Yes, for small text |
| Contrast stretch | Faint or gray text | Can amplify noise and stains | Yes |
| Black-and-white (thresholding) | Faded print, uneven backgrounds | Can erase thin strokes or break letters | Optional mode |
| Shadow correction | Uneven lighting | May lighten faint text further | Yes |
| Invert colors | Light text on dark backgrounds | None on clean images | Yes |
| Noise removal | Speckles on old scans or faxes | Can delete periods, commas and accents | Not stated |
| Sharpening | Slight blur | Halos and false strokes that change characters | Not 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