Image to Text (OCR)
Copy the words out of a photographed document, a screenshot or a scan. Recognition runs on your device, and you can edit the result straight away.
Your images are processed on this device and never uploaded to a server.
How to use it
- Choose one or more images, drop them on the box above, or paste a screenshot with Ctrl+V.
- Check Text language. Add a Second language if the image mixes two, for example English and Spanish.
- Wait for the reading to finish. The percentage under each file name shows its progress.
- Correct the text in the box if needed, then press Copy or Download .txt. For several pages, use Copy all.
How this tool reads text
The tool uses Tesseract, an open-source OCR engine, running in your browser through Tesseract.js. The language models come from the tessdata_fast set: LSTM neural networks that read the image one line at a time. For Latin-script languages these models were trained on about 400,000 lines of text in about 4,500 fonts.
Each image is prepared before it is read. The camera's orientation tag (EXIF) is applied. Images under 1 megapixel are enlarged, up to 3×, towards 2 megapixels, because tiny letters are hard to separate. For example, an 800 × 600 screenshot is enlarged 2.04× to 1633 × 1225 pixels. In our tests, 9-pixel text in a JPEG screenshot had 46% of its words right without enlarging and 94% after enlarging 2×. Photos over 12 megapixels are reduced to 12 megapixels: on our test computer a 53-megapixel image was read in 2.2 seconds instead of 7.1, with the same result. If automatic page layout finds no text, or its confidence is below 60%, the image is read again as a single block of text. That second pass rescues pages photographed a few degrees off level.
What accuracy depends on
- Letter size. The Tesseract documentation recommends at least 300 DPI. At 300 DPI, 10 pt text has an x-height (the height of a lowercase x) of about 20 pixels, and below 10 pixels accurate results are unlikely.
- Contrast. Dark text on a light background works best. Shadows, folds and patterned backgrounds lower accuracy.
- Straight lines. A skewed page makes the lines hard to separate.
- Printed text. Handwriting is recognised poorly.
Tips for photographing documents
- Lay the paper on a flat surface in even light. Turn the flash off to avoid glare.
- Hold the phone parallel to the paper, so the page edges look straight and the page nearly fills the screen.
- Tap the text on screen to focus and wait until it is sharp.
- One page per photo. A 4032 × 3024 photo filled by a Letter or A4 page works out at about 340 to 360 DPI.
Limits
The result is plain text. Tables, columns and formatting are not kept, and text from neighbouring columns can end up on one line. PDF input is not supported yet. Because everything runs on your device, large photos take time on phones, and very large images can fail when memory runs out. Always proofread OCR output before you use it, especially numbers such as account or invoice numbers.