A photo of a printed page, a screenshot of an error message, a scan of a form - to your computer, every one of them is just a grid of colored pixels. The words are there for your eyes but not for your keyboard: you cannot select, search or paste them. Optical character recognition, almost always shortened to OCR, turns those pixels back into real characters. This guide explains what OCR does, what makes it accurate, how to extract text from an image in seconds with the Image to Text tool, and what to do when the result comes back imperfect.
What OCR actually does
OCR runs in stages. The engine first cleans up the picture, converting it to high-contrast black and white and straightening it if the page is tilted. Then comes layout analysis: finding the blocks of text, splitting each into lines, and each line into words. Only then does recognition happen.
Early OCR compared each character against a library of stored letter shapes, which is why it fell apart on any font it had not seen. Modern engines work differently: a neural network reads an entire line of pixels left to right and predicts the sequence of characters most likely to have produced it. Judging a whole line in context rather than one isolated glyph handles unfamiliar fonts, uneven spacing and light noise far better. A language model then nudges ambiguous results toward real words - which is why telling the tool what language it is reading matters so much.
When you need it
OCR is one of those tools you rarely think about until you badly need it:
- Retyping avoidance: pulling text out of a scanned letter, invoice or printed report instead of copying it by hand.
- Screenshots: lifting an error message or a chunk of code out of an image someone sent you.
- Study notes: turning photos of textbook pages, whiteboards or lecture slides into notes you can search and edit.
- Forms and records: getting details off a scanned application, bill or ID into a spreadsheet.
- Accessibility: producing real text a screen reader can announce, which an image cannot provide.
How to extract text from an image
- Open the Image to Text tool and drop in a PNG, JPG, WebP or screenshot.
- Choose the language in the image - English, Hindi, or both together for a mixed page.
- Click Extract text. The first run downloads the OCR engine and language data, a few megabytes, and a progress bar reports each stage.
- Read the result in the editable box, fix any stray characters directly there, then copy it or download it as a .txt file.
Everything happens inside your browser tab, and after the first run the engine is cached, so later extractions start almost immediately.
Choosing the right language
The language setting is not cosmetic - it decides which trained model and dictionary the engine loads, and picking correctly is often the single biggest accuracy win available to you. An English model asked to read Devanagari produces nonsense, because it is forcing every shape into the Latin alphabet it knows. Use the combined English + Hindi option only when a page genuinely mixes both scripts: loading two models makes the engine weigh a far larger set of candidate characters for every shape, which is slower and can introduce cross-script confusion on a page that only needed one.
What makes OCR accurate
Recognition quality depends far more on the image than on the engine. What matters, roughly in order:
- Resolution: text should stay readable when you zoom in - roughly what a 300 DPI scan gives you, around 20 to 30 pixels of height per line of body text. Below that, characters blur together.
- Contrast: dark text on a plain light background. Text over a photo, gradient or watermark is much harder.
- Straightness: a page shot at an angle, or curving away in a book gutter, distorts letter shapes.
- Even lighting: no glare, no hard shadow across half the page.
- Print, not handwriting: typed characters are what these models are trained on.
- Light compression: a heavily compressed JPG smears the fine edges that distinguish similar characters.
One counterintuitive point: do not compress or shrink an image before running OCR. Those steps help for sharing, but they destroy the detail recognition depends on. Run OCR on the original, then compress afterwards with the Image Compressor.
A worked example
Say you photograph a printed invoice with a phone held overhead and get a sharp 3000 by 4000 image in daylight. Run it through OCR in English and the body text should come back essentially clean - a typical result on well-shot printed text is upwards of 95 percent of characters correct, so a handful of errors on a page rather than a mess.
Where those errors turn up is predictable, which makes checking fast. Digits and letters that share a silhouette get swapped: 0 for O, 1 for l, 5 for S, 8 for B. The numbers on an invoice are what you cannot afford to get wrong, so verify totals, dates and reference numbers by eye. The other common surprise is layout: OCR returns a stream of text lines, so the invoice's neat columns arrive with their alignment gone. The characters are right; the table structure is not preserved.
Where OCR struggles
- Handwriting: cursive and casual writing are a different problem, and these models are not trained for them.
- Decorative type: logos, script fonts and heavy display faces are frequently misread.
- Tables: the text comes out, but the row and column structure does not survive.
- Dense multi-column layouts: newspapers and academic papers can have their reading order scrambled.
Images versus scanned PDFs
If your source is a scanned PDF rather than an image, use the OCR PDF tool instead. It runs the same recognition over every page, but rather than handing you a wall of plain text it adds an invisible text layer on top of the original scan - the document looks exactly as it did, but the words underneath become selectable and searchable.
One check first: open the PDF and try to select a line of text. If you can, it already contains real text and needs no OCR - reach for PDF to Word instead. OCR is only for image-only pages where selection does nothing.
Why running OCR in your browser matters
The documents people most often want to OCR are the sensitive ones: payslips, bank statements, ID cards, medical letters, contracts. Most free online OCR services upload your file to their server, so a copy sits on infrastructure you cannot see, under a retention policy you did not read. The Image to Text tool runs the engine inside your own browser tab instead - the image never leaves your device.
Cleaning up the extracted text
Raw OCR output usually needs a light pass. Line breaks land where the printed line ended rather than where the sentence did, so paragraphs arrive chopped into fragments - Remove Line Breaks rejoins them. If the same misreading repeats through a long document, fix every instance at once with Find and Replace, and Word Counter will tell you where you stand against a word limit.
Frequently asked questions
- Why is my OCR result full of wrong characters?
- Almost always the image, not the engine. The usual causes are low resolution (text should stay clearly readable when you zoom in), poor contrast, a page photographed at an angle, glare or shadow, or heavy JPG compression that has smeared the character edges. Check the language setting too - an English model cannot read Hindi script and will return nonsense. Re-shooting the page flat, square on and in even light fixes more errors than any setting you can change.
- Can OCR read handwriting?
- Not reliably. These engines are trained on printed and typed characters, where letter shapes are consistent and predictable. Handwriting varies enormously between people and even between words from the same person, and cursive joins letters together so there are no clean boundaries to separate. Very neat, well-spaced block capitals sometimes come through partially, but anything cursive or casual will not. Handwriting recognition is a separate problem needing purpose-built models.
- Is my image uploaded to a server?
- No. The OCR engine is downloaded to your browser on first use and runs entirely on your own device, so the image is read from local memory and never transmitted anywhere. That is also why the first extraction takes a few extra seconds to start - it is fetching the engine and language data, which are then cached for later runs. It means you can safely OCR payslips, ID documents and contracts without handing a copy to a third party.