utilobox

How to extract text from image files and get clean, usable text

The words you need are locked inside a photo of a page, a screenshot or a scan. This guide shows how to extract text from image files in your browser, how to prepare the picture so the reading is accurate, and how to check and save the result.

Last updated:

Extract text from image files: what OCR does and does not do

OCR, short for optical character recognition, looks at the shapes in a picture and guesses which letters they are. The output is ordinary text that you can select, edit and paste. It is a guess, not a copy: every letter is a decision, and some decisions are wrong. That is why the tool shows the result in an editable box and reminds you to compare anything important with the original.

To extract text from image files with this tool, you work on one file at a time, either a picture or a PDF. Pictures can be JPG, PNG, WebP, GIF, BMP, AVIF or an iPhone HEIC photo. It returns text only. It does not keep columns, tables, fonts or the position of words on the page, and it does not turn handwriting into reliable text, because the engine is built for printed letters. Neat handwriting may come out in part; cursive usually will not.

Step by step with the Image to Text (OCR) tool

Choose the file or drop it on the page. A line with the name and size appears, and the options open below it. Under ‘Document language’, tick every language that appears in the document. The choice is remembered in this browser for next time.

Press ‘Extract text’. The first time, the page loads the recognition engine and the language data, and it says so; after that your browser reuses them and the start is quicker. A progress bar follows, and for a PDF the status line counts the pages as it reads them. When it finishes, the text appears under ‘Extracted text (you can edit it)’ and the status reports how many characters were found.

Correct the text in the box, then use ‘Copy’ or ‘Save as TXT’. The saved file takes the name of your original with .txt at the end. If nothing is recognized, the page says that no text was found and suggests a sharper image or a different document language.

Choose the document language with care

The seven choices are English, Korean, Japanese, German, French, Spanish and Portuguese. The engine uses the language data to decide between look-alike shapes and to recognize accents, so the wrong language gives a poorer result even on a perfect photo. A page of French read with only English ticked is more likely to lose its accents or swap them for plain letters.

Tick only the languages that really occur. For a bilingual page, such as an English sentence next to a Korean one, tick both. Each extra language slows the reading and gives the engine more chances to confuse one shape with another, so do not tick all seven just in case.

Languages outside the list of seven are not available here. A text in a script that is not listed will come out as a string of wrong characters, so it is better to stop than to trust it.

Prepare the picture before you extract

To extract text from image files accurately, the picture matters more than any setting. The tool has no crop or rotate control, so make the image right before you add it. Photograph the page straight on rather than at an angle, with the paper flat and the whole text in frame. Daylight or an even lamp beats a flash that leaves a bright patch, and a shadow across a line is a common cause of missing words.

Dark text on a plain light background reads best. A screenshot is usually the easiest case, because the letters are sharp and perfectly straight. A photo of a glossy page, a curved book spine or small print on a patterned background is harder. If the first result is poor, retake the photo closer and in better light rather than reading it again.

Very large pictures are scaled down so that their longest side is at most 3,000 pixels, because bigger sizes make reading slow without helping. A phone photo is already larger than it needs to be, so there is no gain in sending a bigger one. What matters is that each letter is clearly several pixels tall, so text that is tiny in the frame is better photographed again closer.

  • Hold the camera parallel to the page, not at a slant.
  • Fill the frame with the text and avoid empty margins and background clutter.
  • Keep the page flat and the light even, with no shadows over lines.
  • Turn the picture upright before adding it, since there is no rotate button.
  • Prefer a screenshot over a photo of a screen when you have the choice.

Scanned PDFs and page ranges

A PDF that is only a scan holds pictures of pages, so its text cannot be selected. The tool accepts such a file and draws each page as an image before reading it. Under ‘Pages’, choose ‘All pages’ or ‘Page range’ and type something like 1-3, 5. Pages outside the file’s length are refused with a message that tells you the allowed range.

Reading is done page by page, so a long document takes time, and a range saves a lot of it. When more than one page is read, the result puts a line such as ── Page 2 ── in front of each page’s text, which makes it easy to find your place. Remove these markers if you do not want them in the final text.

If the PDF already has selectable text, reading it as pictures is unnecessary and may introduce mistakes. Try selecting a word in the PDF first. Only a file where you cannot select text needs this step.

Check and clean the result

After you extract text from an image, read it next to the original, not on its own. Look first at the things OCR gets wrong most often: names, numbers, dates, prices, email-style strings and similar-looking pairs such as zero and the letter O, or the digit one and a lowercase l. A wrong digit in an invoice total is more damaging than a wrong letter in a sentence.

Line breaks often follow the lines of the picture, not the sentences of the text. If you plan to use the text as paragraphs, join the broken lines. Columns may be read in a surprising order, and a table comes out as loose lines of words. For a table, it is usually quicker to retype the few cells that matter than to repair the output.

Once the text is clean, the Character counter can give you a word or character count, and Text compare (diff) can show what you changed from the raw result, which is useful when you must prove a text was not altered by hand.

Privacy and the first-run download

The recognition engine runs in your browser, and the picture or PDF you choose is not uploaded. What the page does fetch from this site on the first run is the program data and the language files, about 1 to 3 MB for each language you tick. That is why the first reading starts slower than the next ones.

Treat the extracted text with the same care as the picture: if the picture was an ID card, a contract or a medical note, the text file you save is just as sensitive.

Questions and answers

How do I extract text from a screenshot?

Choose the screenshot, tick the language of the text and press ‘Extract text’. Screenshots are usually the most accurate input because the letters are sharp and straight.

Can it read handwriting?

Only poorly. The engine is trained on printed letters, so neat block writing is sometimes partly read and cursive usually is not.

Why are some letters wrong in the result?

Recognition is automatic. Blur, shadows, a tilted page or the wrong document language cause errors. Fix the text in the box, or retake the picture closer and in better light.

Can I read only some pages of a scanned PDF?

Yes. Choose ‘Page range’ and enter pages such as 1-3, 5. It is much faster than reading the whole file.

Does the tool keep the layout of tables or columns?

No. The result is plain text. Tables and columns lose their layout, so check the order of the lines and rebuild any table you need.

Is my picture uploaded?

No. The reading happens in your browser. Only the engine and language data are fetched from this site the first time you use the tool.