fixmint

How to copy text from a screenshot or photo, on your device

By · · 5 min read

To copy text out of a screenshot or a photo, you need OCR, optical character recognition: software that finds the letters in an image and turns them into characters you can select, edit and paste. Paste or drop the picture into the image to text tool and the words appear as editable text. The reading happens in your browser, and the image is not uploaded anywhere.

Image to textText in a picture won’t copyOpen

How OCR reads an image in plain words

An image is only a grid of coloured dots. OCR works in stages. It first looks for blocks of text and the lines inside them. Then it turns each line into a sequence of letter shapes and decides which character each shape most likely is. Finally it uses patterns learned from a large amount of English text to choose between similar candidates, so that "rn" and "m", or "l" and "I", are settled by the words around them.

The engine behind this tool is Tesseract, an open-source OCR engine released under the Apache 2.0 licence. This site uses a version compiled to WebAssembly, a format browsers can run at near-native speed, through the tesseract.js library. It uses an English model based on a neural network (an LSTM). The first time you use it, the engine and the model download, and the browser keeps them for later use. After that, the reading happens on your device.

The limits follow from that design. The model is for English and for text in the unaccented Latin alphabet. Other alphabets, such as Cyrillic, Arabic or Chinese, are not supported, and accented letters will not be read reliably. Handwriting is a different problem, and it is not what this tool is for.

Why screenshots read better than photos

A screenshot is the text as the computer drew it: sharp edges, a known size, flat colour, no perspective. A photo of the same text includes everything the camera saw: the angle of the page, shadows, curled paper, glare, motion blur, and the compression that phones apply to save space. Each of those changes the shapes OCR has to match.

Size matters too. As a rule of thumb, OCR works best when capital letters are at least 20 to 30 pixels high. Text in a small thumbnail can be too small to separate, and text in a heavily shrunk screenshot blurs into grey. The tool enlarges small images before reading, which helps, but it cannot recover detail that was never in the file. If you can, take the screenshot at the size the text appears on screen, and do not zoom the page out just to fit more on it.

Dark-mode screenshots are a special case. White text on a dark background is harder for many OCR engines, so the tool inverts these images before reading. You do not need to do anything. A very low-contrast dark screen, such as grey text on dark grey, will still read poorly.

Tips for a clean result

  • Crop to the text. Remove toolbars, icons and buttons first. Crop the image so that only the block you need remains. Less clutter means fewer words the tool has to guess at.
  • Straighten a photo. Hold the phone parallel to the page, so the lines run level. A skewed page reads worse, and a line that runs off the edge of the frame will lose its last letters.
  • Use even light. Daylight from the side is best, and a flash that bounces off a glossy page is the worst. A shadow across half the page will cut the reading in two.
  • Get close, but not too close. Fill the frame with the text. A distant photo of a whole page spends its pixels on the margins.
  • Avoid heavy compression. A messaging app that sends a photo as a low-quality copy has thrown away detail. Send the original file, or take the screenshot again.

Check the words the tool marks

After reading, the tool shows three numbers: the word count, the average confidence, and the number of words to check. It also marks words it is unsure of in red on the image. Read the red words against the original before you use the text, because those are the places where OCR most often goes wrong.

The usual confusions are predictable: the letter O and the digit 0, the capital I and the lowercase l, the digit 1, the letter S and the digit 5, and a comma that reads as a full stop. Amounts and codes deserve the closest check, since one wrong digit can change the meaning completely. Average confidence is useful for judging a whole page. If it is low, the image is probably the problem, and a better photo will beat any amount of editing.

Join lines into paragraphs

OCR reports text as the lines appear on the page. Copy a paragraph from a narrow column, and each visual line may come out as its own line. The option to join lines into paragraphs removes those breaks, so the text flows again. Do not use it for lists, poems, addresses, code or tables, where the line breaks carry meaning. If you have already copied broken text from a PDF or an email, the fix pasted text tool repairs the lines in that text.

When the text is right, use Copy text, or Save .txt if you want a file.

Why reading on the device matters

Screenshots often hold things you would not want on a stranger's server: bank details, a boarding pass, a medical letter, a private message. Many online OCR sites send the image to their servers to read it. This tool does not. It runs in your browser, with no account and no upload.

Reading the text is one job, and hiding parts of it is another. If you need to cover parts of a screenshot before you share it, use the redact image tool first, then run the text reader on the version you are willing to share.

Quick answers

Why does the tool take a while the first time? It downloads the OCR engine and the English model, which are large. Later uses reuse the cached files.

Why is one word wrong when the rest is right? The engine chose the most likely character for a shape that was unclear. Look at the marked word and correct it in the text box.

Can it read a whole book? It reads one image at a time. Very large images use a lot of memory and take longer, so split a long document into pages first.

Cover of How to Remain Valuable When Intelligence Becomes CheapHow to Remain Valuable When Intelligence Becomes Cheap

224 pages on the human, economic and strategic advantages that stay scarce when AI can do most cognitive work.

$3.84 Get it on Gumroad →