OCR · 10 min read
Copy Text from an Image or Scan (OCR): How to Get Accurate Results
By the site owner · Published
Optical character recognition, OCR, turns a picture of text into text you can copy, search and edit. Modern engines read clean print almost perfectly, which makes the bad results all the more puzzling: the same software that reads a screenshot flawlessly turns a phone photo of a letter into “Tbe qnick brown f0x”. Almost always, the cause is the picture, not the engine.
This guide explains what an OCR engine needs — enough pixels per letter, level lines, clear contrast, a simple layout and the right language — and how to get there with a scanner or a phone. It also covers what OCR can't do well, handwriting above all, and the difference between copying plain text and making a searchable PDF. Toolula's OCR tools use Tesseract, the open-source engine, running in your browser; the examples refer to them.
How OCR reads a page
An OCR engine first turns the image into black ink on white paper, finds blocks of text and the lines inside them, cuts the lines into words and then recognises the words. Tesseract, the engine behind Toolula's tools, recognises a whole line at a time with a neural network and checks its guesses against what words in the chosen language usually look like.
Each step can fail on its own. Shadows or a coloured background break the black-and-white step; a tilted page makes lines run into each other; columns and tables confuse the layout step; and a wrong language makes the recognition step reject correct letters. Knowing which step went wrong tells you what to fix.
Resolution: enough pixels per letter
OCR needs detail. For scanning ordinary printed documents, 300 dpi is the usual recommendation; small print such as footnotes or the back of a receipt benefits from 400–600 dpi. Going beyond that rarely helps and only makes files larger. What actually matters is the height of the letters in pixels: a capital letter should be at least around 20 pixels tall, and more is better.
With a phone, fill the frame with the page instead of photographing it from far away, hold the phone parallel to the paper, and tap to focus. A screenshot of a web page is usually fine as it is. Never enlarge a small, blurry image in the hope of more detail — enlarging adds pixels, not information.
PDFs are a special case. Toolula's Image to text tool draws each PDF page at twice its nominal size, about 144 dpi, which is plenty for normal body text but can be tight for very small print. For such pages, scan or export the page as an image at 300 dpi and drop that instead. Scan to PDF and OCR PDF bring PDF pages in at 200 dpi.
Straight lines and the right orientation
Tesseract copes with a slight tilt, but a page photographed at an angle, or with a curved spine, produces lines that drift into each other. Lay the page flat, photograph it from straight above, and for books press the pages flat or scan them.
Image to text can turn a picture in quarter turns (rotate left and right) and lets you select the area to read, but it doesn't straighten a small tilt for you — level the photo in your camera or gallery app first if it is noticeably skewed. Scan to PDF, which is also what OCR PDF uses, detects edges, corrects perspective and levels each page automatically, both sideways pages and tilts of up to 15 degrees. It does not detect an upside-down page, so turn that one by hand.
Contrast, light and background
Dark text on a light, even background reads best. Shadows from your hand or phone, glare on glossy paper, faded thermal receipts, grey recycled paper and text printed over pictures or coloured boxes all make it harder for the engine to separate ink from paper. Use even daylight or two light sources, avoid flash on glossy paper, and photograph receipts soon — thermal print fades.
Scan to PDF has filters that clean up the page before OCR: Enhanced Color whitens grey paper and removes shadows while keeping colours, Magic B&W Scanner turns the page into crisp black and white. Original Color keeps the scan as it is. If a phone photo comes out poorly in Image to text, running the page through Scan to PDF with a cleaning filter is often the fastest fix.
Columns, tables and forms
Tesseract finds columns and blocks on its own, and for a normal two-column article it usually keeps the reading order. Layouts with text boxes, captions and sidebars are harder: the text comes out complete, but in an order you didn't expect. Tables lose their structure entirely — the result is lines of words with spaces in between, not cells.
Two habits help. Use “Select area” to read one column, box or table part at a time, and paste the pieces where they belong. And keep “Join lines into paragraphs” on for running text — it removes the line breaks inside paragraphs and keeps blank lines — but switch it off for lists, addresses and tables, where every line break matters. For tables in PDFs that already contain real text, PDF tables to Excel extracts the cells directly without OCR.
Handwriting: an honest limit
Tesseract is trained on printed text. Neat block capitals are sometimes recognised, joined-up handwriting mostly is not, and the result can look plausible while being wrong. Signatures, notes in the margin and handwritten forms are best typed by hand or checked word by word.
Whatever you read, use the Check view: it marks the words the engine is unsure about, and the overall confidence percentage gives a first impression. A low confidence is a sign to improve the picture rather than to proofread a long text.
Choosing the language
The language setting is not a cosmetic choice. It decides which letters the engine expects and which words it considers likely. Read a German letter as English and “ß” turns into “B”, “ä” into “a”; read a French text as German and accents disappear. Image to text offers 24 languages: English, German, French, Spanish, Italian, Portuguese, Dutch, Polish, Swedish, Danish, Finnish, Norwegian, Czech, Romanian, Hungarian, Greek, Ukrainian, Russian, Turkish, Chinese (Simplified and Traditional), Japanese, Korean and Arabic.
For mixed documents — a German contract with English terms, a menu in two languages — choose a second language; reading with two at once is slower but handles both. “Detect script automatically” reads once and, if the text looks like Arabic, Chinese, Japanese, Korean, Cyrillic or Greek, reads it again in that language. It can't tell Latin-script languages apart, so for those pick the language yourself. Each language's data is downloaded once from toolula.com and kept in the browser. OCR PDF offers twelve of these languages for searchable PDFs.
Plain text or a searchable PDF?
If you want to reuse the words — quote them, edit them, translate them, paste them into a form — plain text is what you need. Image to text shows the recognised text in an editable box; you can copy it, copy it with formatting, download it as TXT, Markdown, HTML or JSON with every word's confidence, translate it in the page, or read several files at once and download all results as TXT.
If you want to keep the document as it looks but find words in it, select them and let others search it, make a searchable PDF instead. OCR PDF saves each page as an image and lays the recognised words invisibly on top at their exact positions, so the page looks like the scan while search and copy work. Only run it on scanned pages: a PDF that already has selectable text doesn't need OCR, and running it anyway turns its pages into images with a new, less accurate text layer.
- Drop the photo, screenshot or PDF on Image to text, or paste a screenshot with Ctrl+V.
- Choose the text language, and a second one if the document mixes two.
- Rotate the picture if needed and select the area to read.
- Check the marked words against the original, then copy or download the text.
- For a searchable PDF instead, open OCR PDF, pick a filter and the language, and export.
Frequently asked questions
What resolution is best for OCR?
300 dpi for normal print, 400–600 dpi for very small text. For photos, the letters should be at least about 20 pixels tall.
Why does OCR turn ß into B or drop accents?
The wrong language is selected. Choose the document's language, and add a second one for mixed texts.
Can OCR read handwriting?
Only to a limited degree. Tesseract is trained on print: neat capitals sometimes work, joined-up handwriting mostly doesn't. Check every word.
How do I keep the layout of a table?
OCR returns lines of words, not cells. Read the table area on its own with line joining off, or, for PDFs with real text, use PDF tables to Excel.
What is the difference between OCR text and a searchable PDF?
Text is for reusing the words. A searchable PDF keeps the scan's look and adds an invisible text layer so you can search and select.
Are my images uploaded?
No. Recognition runs in your browser; only the language data is downloaded from toolula.com once.
How this guide is kept current: it is checked against the official sources it cites and against the Toolula tools it describes, and revised when a rule, deadline or tool changes. The date above shows the last revision.