How to Turn a Scanned Image or Document Into Editable Text
An explanation of OCR technology and how to extract accurate text from scanned images or PDFs, plus the factors that most affect accuracy.
It's a common, frustrating situation: you have an important document — an old contract, a page from a book, a screenshot of text — but it only exists as an image, and you can't copy or edit a single word of it. That's exactly what Optical Character Recognition (OCR) solves: it "reads" the characters inside an image and turns them into real, copyable, editable, searchable text.
What affects accuracy the most
- Image clarity and resolution — the sharper the source image, the more accurate the result.
- Whether the text is straight or captured at an angle — a skewed scan noticeably hurts accuracy.
- Font type: standard printed fonts get read far more accurately than handwriting or decorative fonts.
- Contrast between text and background — solid black text on a white background is the ideal case.
- The quality of the original scan for old paper documents (stains, creases, faded ink all reduce accuracy).
If the result contains small errors in a few words, double-check those against the original image before relying on it fully — especially in official documents, numbers, and dates, where a single wrong character can change the meaning entirely.
What if it's a whole multi-page document, not a single image?
How to prepare the image for higher accuracy
Recognition accuracy follows image quality more than any other factor, and these are not general photography tips — each one makes a measurable difference to the output.
- Shoot straight down onto the page rather than from an angle: skew curves the baselines and stretches the letterforms, and it is the single largest cause of a poor result from an image that looks perfectly clear to the eye.
- Crop to the block of text: background, the edge of the desk and part of the facing page are all noise that confuses the engine.
- Light the page evenly and do not use flash on glossy paper: the flash blows out a region of the page and the letters in it disappear entirely.
- Make the text large in frame: a character less than roughly twenty pixels tall is hard to recognise no matter how sharp the image, so move the camera closer instead of relying on digital zoom afterwards.
- Watch for cast shadows: the shadow of your hand or of the phone itself cuts the contrast across the middle of a line.
The language setting is the one that matters most
Picking the wrong language ruins the result even on an excellent image, because the engine matches letterforms against a specific language model — Arabic text read with an English model produces random Latin characters, not spelling mistakes. The engine here is Tesseract running inside your browser, with every asset and language file served from this same site rather than a third-party network, and it loads only when you actually open an OCR tool, which is why the first run feels slower than the ones after it. For documents that mix Arabic and English on the same line, try two runs with different languages and take what each one got right — that is faster than correcting one garbled output.
When you do not need OCR at all
Many people run OCR on a file that does not need it, and get a far worse result than was already available to them for free. The test is simple: open the PDF in any reader and try to select a word with the mouse. If the selection works, the file already has a text layer, and the PDF to Text tool will give you the text completely and accurately and almost instantly — because it reads text that exists rather than guessing it from a picture. If you cannot select anything, the pages genuinely are images, and that is when OCR for scanned PDFs is the right tool.
Formatting is not preserved: the output is raw text, and columns and tables can come out interleaved because the engine reads the page as visual lines rather than as a logical structure. For connected scripts such as Arabic, expect to proofread — joined letterforms are harder for every recognition engine than separated ones, which is a fact of the field rather than a flaw in one tool.
If you have a full scanned PDF (not just one image), you need a tool built specifically for scanned PDFs that processes every page and returns the complete document's text at once, instead of handling each page manually as a separate image. On the other hand, if the PDF is already text-based rather than a scan, extracting its text is far simpler and doesn't need OCR at all — knowing which case you're dealing with saves a lot of time.