Key takeaways
- OCR turns pictures of text into editable text; screenshots and clean scans give the best results.
- Sharpness, size and contrast matter most: fill the frame with the text and avoid shadows and angles.
- Scan at 300 dpi or more; very small letters are the most common cause of errors.
- Always proofread, especially numbers, names and similar-looking characters.
On this page
What OCR does
Optical character recognition (OCR) looks at the shapes in an image, finds lines and words, and matches each shape to a letter. Modern engines such as Tesseract use a neural network (LSTM) trained on large amounts of printed text, which reads whole lines rather than single letters and copes well with ordinary fonts in many languages, including Arabic.
Five ways to get better results
- Get close. Fill the frame with the text you need. Small text is the most common cause of mistakes; Tesseract's documentation notes accuracy drops when letters are only a few pixels tall.
- Keep it straight and flat. Photograph the page from directly above, with the page flat. Curved book pages and angled shots distort the lines.
- Use even light. Avoid shadows from your phone or hand, and glare on glossy paper. Daylight near a window works well.
- Crop away clutter. Use crop image to remove backgrounds, other pages and photos, so the engine focuses on the text.
- Scan at 300 dpi or more when using a scanner, in greyscale or colour.
Screenshots, photos and PDFs
| Source | Typical accuracy | Tip |
|---|---|---|
| Screenshot of a web page or app | Excellent | Zoom in before taking the screenshot so the text is large |
| Flatbed scan of a printed page | Very good | 300 dpi, page straight on the glass |
| Phone photo of a document | Good | Steady hands, even light, fill the frame |
| Scanned PDF | Good | Convert pages to images with PDF to JPG at 200–300 dpi first |
| Handwriting | Poor | OCR engines for print are not designed for handwriting |
If a PDF contains real text (you can select it in a PDF reader), you do not need OCR at all: use PDF to text instead, which is exact.
Check the result
Even good OCR makes occasional mistakes: 0 and O, 1 and l, rn and m, and missing accents. Proofread anything you will rely on, especially figures, dates, names and account numbers. The image to text tool shows a confidence score; below about 60%, try a clearer image.
Privacy
Documents you photograph often contain personal details. Many online OCR services upload your image to their servers. Toolkeel's OCR runs entirely in your browser using WebAssembly, so the image stays on your device.
Sources
- Tesseract documentation: Improving the quality of the outputtesseract-ocr.github.io
- tesseract.js (open-source OCR in the browser)github.com