Retyping text from a picture is slow and error-prone. Yet it happens constantly: a photographed notice, a screenshot of an error message, a scanned letter, a printed receipt, a slide from a conference talk. Optical character recognition (OCR) does the reading for you and turns pixels into editable, searchable text.
OCR is not magic, though. The same tool can produce near-perfect text from one image and gibberish from another. This guide explains how OCR works, what the software needs from an image, how to run it in a browser, and the built-in OCR features on phones and computers that you may already have.
How OCR turns pixels into text
Modern OCR engines work in stages:
- Pre-processing. The image is converted to greyscale and then to black and white (binarised), so text stands out from the background.
- Layout analysis. The engine finds blocks of text, then lines, then words, and works out the reading order.
- Recognition. Each word or line is passed to a trained model that predicts the most likely characters. Current engines, including the open-source Tesseract engine our tool uses, analyse whole lines with neural networks rather than matching letters one at a time.
- Language modelling. The engine uses language data (character sets and word patterns for the chosen language) to prefer plausible words.
Two consequences follow. First, the engine needs the right language data: an English model cannot read Devanagari script. Second, anything that makes text hard to separate from its background (blur, shadows, low contrast, busy patterns) hurts accuracy more than anything else.
What makes an image OCR-friendly
| Helps | Hurts |
|---|---|
| Text at least 20-30 pixels tall | Tiny text in a large photo |
| Even lighting, dark text on a light background | Shadows, glare, coloured backgrounds |
| Straight, flat page photographed head-on | Curved book pages, steep angles |
| Printed or typed text | Handwriting, decorative fonts |
| Screenshots saved as PNG | Heavily compressed, re-shared images |
Extract text with our tool
The Image to Text (OCR) tool runs the OCR engine inside your browser. Your image is never uploaded.
- Open Image to Text and drop a screenshot, scan or photo (PNG, JPG, WebP or BMP, up to 20 MB).
- Choose the Language in the image. Options include English, Hindi, English + Hindi, Marathi, Bengali, Tamil, Telugu, Gujarati, Punjabi, Urdu, French, German and Spanish. Use English + Hindi for documents that mix both.
- Click Extract text. The first time you use a language, the engine and its language data (roughly 2-15 MB per language) download once and are then cached by your browser. A progress bar shows each stage.
- Read and correct the result in Extracted text (you can edit it). Below the box you will see the word and character count and the engine's OCR confidence.
- Copy the text, or save it with the .txt button. Stop cancels a long job, and Start over clears everything.
A low confidence score is a useful warning: proofread carefully, or improve the image and try again.
Built-in OCR you may already have
On phones
- iPhone and iPad: Live Text lets you touch and hold text in a photo or the camera view, then copy it. It is excellent for quick grabs.
- Android: Google Lens, built into the camera or Photos app on many phones, offers a Text option to select and copy words.
For a line or two, these are faster than any other method.
On computers
- Windows: Microsoft PowerToys includes Text Extractor (by default Win + Shift + T), which lets you draw a box around any text on screen and copies it to the clipboard. The Snipping Tool in recent Windows 11 versions can also copy text from a screenshot.
- macOS: Live Text works in Preview and Photos; you can select text in an image directly.
Office and cloud apps
OneNote can copy text from a pasted picture, and Google Drive can open an image or PDF with Google Docs to produce a text version. These are convenient if the file is already in that service, but they involve uploading it.
Command line
The same Tesseract engine is available as a command-line program:
tesseract receipt.png output -l eng
This writes output.txt and is ideal for batch processing hundreds of files.
Tips for better accuracy
Crop to the text
Remove photos, logos and table borders around the text you need. Less clutter means cleaner layout analysis. The Image Cropper is quick for this.
Straighten and flatten
A slanted page confuses line detection. Rotate the image so lines are horizontal with the Image Rotator, and photograph documents from directly above.
Increase size and contrast for small text
If the text is tiny, enlarging the image before OCR often helps. Adjusting brightness and contrast, or converting to black and white, can rescue a faint photocopy.
Choose exactly the languages present
Selecting a language that is not in the image can reduce accuracy. Pick the combined option only when both scripts appear.
Expect to fix layouts
OCR returns text, not formatting. Columns can merge, tables become lines of words, and hyphenated line breaks remain. Clean-up tools such as Remove Line Breaks help turn the output into flowing paragraphs.
Scanned PDFs
If your text is inside a PDF rather than an image, check first whether the PDF already contains real text with PDF to Text. If it is a pure scan, convert the pages to images and run OCR on them.
Frequently asked questions
Can OCR read handwriting?
Printed and typed text gives the best results. Neat block handwriting is sometimes recognised, but joined-up handwriting usually produces many errors with general-purpose OCR engines.
Why is my extracted text full of errors?
The usual causes are blur, low contrast, small text, a skewed page or the wrong language setting. Crop, straighten and enlarge the image, then try again.
Does the tool support Hindi and other Indian languages?
Yes. You can choose Hindi, Marathi, Bengali, Tamil, Telugu, Gujarati, Punjabi and Urdu, plus a combined English + Hindi option.
Is my image uploaded for OCR?
No. The OCR engine runs in your browser. Only the engine and language data are downloaded, once, and your image stays on your device.
Can OCR keep the original formatting?
No. OCR outputs plain text, so fonts, columns and tables are lost. You will need to reformat the text in your document editor.