OCR

How to Convert Images to Text (OCR) – Step by Step Tutorial

8 min read

Extracting text from a photo or scan takes under a minute once you know the sequence. Most failed OCR attempts fail at the capture stage, not the software stage.

Retyping text from a photograph is one of the most avoidable chores in modern computing. Optical character recognition can do it in seconds, and the tools are free and run in your browser. This tutorial walks through the whole process, including the preparation steps that make the difference between usable output and gibberish.

What you will need

  • An image containing printed text — JPG, PNG, or WebP.
  • A modern browser. Nothing to install.
  • A couple of minutes to review the result.

If your source is a PDF, convert the relevant pages to images first using PDF to JPG, then continue from step two below.

Step 1: Capture the image properly

This step determines your results more than any other. OCR engines are good at reading clear text and poor at guessing from mush.

If photographing with a phone

  • Shoot straight down on the page, not at an angle. Perspective distortion warps letterforms.
  • Use even, indirect light. Avoid casting a shadow with your phone or hand.
  • Tap to focus on the text and wait for the preview to sharpen before capturing.
  • Fill the frame with the text you need — do not photograph the whole desk.
  • Flatten the paper. Curl and creases distort baselines.

If using a scanner

  • Scan at 300 DPI. Higher rarely helps for standard body text and slows processing.
  • Choose greyscale over colour unless colour carries meaning — it is cleaner for recognition.
  • Disable automatic "enhancement" filters that soften or sharpen aggressively.

Step 2: Clean up the image

A few quick corrections before recognition pay for themselves. If the image is rotated or upside down, straighten it with Rotate/Flip Image — OCR expects horizontal baselines and a sideways page will produce almost nothing usable.

If the image contains a lot of irrelevant surrounding area, crop tightly to the text block with the Image Cropper. Removing furniture, hands, and page edges reduces the chance of the engine misinterpreting non-text regions.

If the file is enormous — a 50 megapixel scan, for example — you do not need to shrink it for accuracy, but reducing it with the Image Resizer to around 2000 to 3000 pixels on the long edge will speed processing noticeably without harming recognition, provided characters remain at least 20 pixels tall.

Step 3: Run the recognition

Open the Image to Text (OCR) tool and drop your image onto the upload area, or click to browse for it. Then:

  • Select the language of the text. This is important — the engine uses a language model to resolve ambiguous characters, and the wrong model produces markedly worse output.
  • Wait for the language model to download the first time. It is cached afterwards, so subsequent runs start immediately.
  • Start the extraction and let the progress indicator complete. A single page typically takes a few seconds to half a minute depending on size and your device.

Everything happens locally in your browser. The image is never uploaded, which matters when the document is an invoice, a medical letter, a payslip, or anything covered by a confidentiality obligation.

Step 4: Proofread the output

Never use OCR output unreviewed. Even excellent recognition makes characteristic mistakes, and they cluster in predictable places.

  • Digits and letters that look alike: 0 and O, 1 and l and I, 5 and S, 8 and B.
  • Punctuation, especially commas versus periods in numbers — a decimal point error changes a figure by a factor of ten.
  • Line breaks and hyphenation, where words split across lines may be rejoined incorrectly.
  • Proper nouns, product codes, and serial numbers, which have no dictionary support.
  • Column order in multi-column layouts, which can be interleaved incorrectly.

Read the extracted text against the image once, paying particular attention to anything numeric. Then copy it out or download it as a text file.

Step 5: Handle difficult sources

Some images resist recognition. Before concluding that OCR cannot handle your document, try these adjustments.

Low contrast

Grey text on a coloured background, watermarks behind body copy, and faded photocopies all reduce accuracy. Increasing contrast in any image editor before recognition often rescues them.

Very small text

If characters are under about 20 pixels tall, recognition degrades sharply. Recapture at higher resolution rather than upscaling the existing image — upscaling adds pixels but no information.

Mixed languages

Run the document twice with different language models and combine the results, rather than expecting one pass to handle both scripts.

Handwriting and decorative type

Standard OCR is trained on printed type and will generally fail on cursive handwriting, heavily stylised display faces, and ornate script. This is a limitation of the technology rather than a setting to adjust.

A realistic sense of what to expect

On a clean, well-lit, straight capture of ordinary printed text, expect the output to be close to perfect with a handful of corrections. On a hurried snapshot of a crumpled receipt, expect to do meaningful editing — but still far less than retyping. Used with reasonable expectations and thirty seconds of preparation, OCR is one of the highest-leverage tools available for anyone who works with paper.

Try the tools mentioned in this article

Every Convert26 tool runs entirely in your browser. Your files are never uploaded to a server.

Browse tools

Related reading