How to Extract Text From an Image (Screenshots, Scans, and Photos)
A screenshot of a paragraph looks like text to you and like a grid of coloured pixels to your computer. You cannot select it, search it, or paste it into a document. The information is there, but it is locked inside a picture.
Optical character recognition (OCR) is the process that unlocks it — reading the picture and rebuilding the characters it represents. It used to require dedicated software and a scanner. It now runs in a browser tab, on the device in your hand.
What OCR actually does
It is not one step. It is a pipeline, and understanding the stages tells you exactly why some images convert cleanly and others come out as garbage.
Preprocessing. The engine converts the image to greyscale and then to black and white, choosing a threshold that separates ink from background. It may also correct a slight rotation and estimate the baseline the text sits on.
Layout analysis. Before reading anything, the engine works out what is on the page: which regions are text, which are images, how the lines are arranged, whether there are columns. Get this wrong and the output jumbles unrelated blocks together.
Line and word segmentation. Within a text region the engine finds lines, then splits lines into words, then words into individual characters.
Character recognition. This is the part people think of as “OCR”. Modern engines such as Tesseract use a neural network trained on millions of text samples. Instead of matching one character at a time, it reads a whole line of pixels and predicts the most likely sequence of characters — which is why it handles touching letters and unusual fonts far better than older engines did.
Language modelling. Finally, the engine applies a dictionary and language rules to fix obvious errors. This is why telling the tool the right language matters so much: rn and m look nearly identical to the recogniser, and only the dictionary knows which one forms a real word.
What decides whether the result is good
Accuracy is not a property of the tool. It is a property of the image you feed it.
Resolution. Text needs enough pixels to have distinct letter shapes. As a rule of thumb, a capital letter should be at least 20 pixels tall. Scans at 300 DPI are the long-standing standard for a reason — below that, thin strokes start merging.
Contrast. Black text on white is ideal. Grey text on a beige background, or text laid over a photo, forces the thresholding step to guess, and it will guess wrong in places.
Skew. A page photographed at an angle is a real problem. Engines correct a couple of degrees automatically, but a photo taken 15 degrees off-axis degrades badly. Straighten the shot, or the scan.
Font. Clean, common typefaces — Arial, Helvetica, Times, and the standard web fonts — convert near-perfectly. Decorative fonts, condensed type, and anything where letters nearly touch will lose characters.
Language. This is the single most underrated setting. An English-language model reading Chinese text produces noise; a Chinese model reading English produces characters that look right and mean nothing. Select the actual language, or a bilingual mode if the document mixes them.
Getting the best result from a bad image
Most disappointing OCR results are fixable before you ever run the tool.
Crop to the text. Borders, shadows, and background clutter all cost accuracy. Cropping the image down to just the text region removes them from the problem entirely.
Scale it up. If the text is small, enlarging the image before recognition helps — a 2× upscale of a low-resolution screenshot often beats the original. The engine needs pixels, and interpolation gives it more to work with than a thin, aliased source.
Increase contrast. A washed-out phone photo of a receipt improves dramatically if you raise contrast before recognising it. The thresholding step has less to guess at.
Straighten it. Rotate a skewed capture back to level. Even a few degrees matters.
Convert the format if the tool struggles. Some engines handle PNG better than JPEG, because PNG has no compression artefacts around letter edges. Converting the image to a lossless format first can help with a heavily compressed source.
Running the recognition
- Open the image to text tool.
- Add the image — a screenshot, a scan, or a photo.
- Choose the language, or bilingual mode if the document mixes languages.
- Run it, then copy or download the extracted text.
The engine runs on your device. Your image is not uploaded anywhere — which matters more for OCR than for almost any other file operation, because the images people need to read are rarely neutral ones.
Why the privacy question is sharper here
Think about what people actually OCR: passport photos, ID cards, bank statements, medical letters, contracts, signed forms, screenshots of private messages. The category of image you need to extract text from is, almost by definition, the category you would least want sitting on a stranger’s server.
An upload-based OCR service receives a complete, high-resolution copy of exactly that. You have no way to verify what happens to it afterwards, and the document is often identifiable in itself — a passport scan carries a name, a number, and a photograph.
Running OCR locally removes the question. Recognition is slower than a server farm with GPUs, but the image never leaves your device. The reasoning behind that trade-off is laid out in are online file converters safe.
Where OCR still fails
Be realistic about the boundaries.
Handwriting. Modern engines handle neat print well and handwriting poorly. Cursive is close to hopeless. There is no setting that fixes this.
Very low resolution. If the text is under roughly 10 pixels tall, there is not enough information in the image to recover reliably. Upscaling helps to a point, then it just enlarges the blur.
Text over busy backgrounds. Captions over photographs, text on patterned packaging, and signage against complex scenes all defeat the thresholding step.
Tables. OCR reads text, not structure. A converted table usually comes out as a stream of values with no cell boundaries. Rebuilding the table is a separate step.
Mathematical notation and special symbols. Standard character sets are handled; equations, musical notation, and uncommon symbols generally are not.
After the text is out
Extraction is rarely the last step. Usually you need the text inside a document — in which case a PDF that already has a text layer can go through a PDF to Word conversion, though a scanned PDF (which is just images) still needs OCR first.
If you are starting from an iPhone photo, note that HEIC files may need converting to JPG before some tools will read them, though browser-based tools usually accept them directly.
And always proofread. Even at 95% accuracy, a 500-word page carries around 25 wrong characters, and they cluster exactly where the numbers and names are — the parts you cannot afford to get wrong.
Frequently asked questions
Is OCR accurate enough to trust without checking? No. Even on clean scans, expect errors in the 1–5% range, concentrated in punctuation, similar-looking characters, and digits. Always proofread anything that will be published or used for a decision.
Can OCR read handwriting? Poorly. Neat block letters sometimes work; cursive essentially does not. No current browser-based engine handles it reliably.
Why does my Chinese text come out as nonsense? Because the language model is set to English. An English model reading Chinese characters produces plausible-looking Latin letters. Set the language to Chinese, or bilingual.
Do I need to convert my image before running OCR? Not usually. Browser tools accept the common formats directly. Converting to PNG can help if your source is a heavily compressed JPEG, because compression artefacts around letter edges confuse recognition.
Does OCR work on a scanned PDF? The pages need to be extracted as images first, then recognised one by one. A PDF that already has a text layer does not need OCR at all — you can copy from it directly.