How to extract text from images and scans (OCR)
By the Filebird team · Updated October 18, 2026 · 7 min read
You photograph a printed contract, a bank letter or a page from a book, and now you need the words in it as text you can search, copy or edit. Retyping is slow and error-prone. Optical character recognition, usually shortened to OCR, does the typing for you by looking at the picture and deciding which letters are there. It works well on clean printed pages and badly on messy ones, and most of the difference comes from the photo you give it, not from the software.
This guide explains what OCR does, which properties of an image help or hurt, how to prepare a bad scan, and how Arabic and mixed-language pages behave. When you are ready, the OCR tool runs in your browser, so the image or PDF never leaves your device.
What OCR does with your picture
An OCR engine does not "understand" a page the way you do. It first turns the picture into black ink on a light background, then finds blocks of text, then lines, then individual words and characters. For each piece it picks the most likely letters, and it uses a dictionary-style model of the chosen language to correct guesses. If a smudged word could be "rnodern" or "modern", the language model pushes it toward the real word.
Filebird uses Tesseract, a long-established open-source engine, compiled so it can run inside the browser. The first time you use it, the engine and the language data for the language you picked are downloaded and then cached by your browser. That download is program and model data only. Your photo is processed locally and is not sent anywhere.
Two things follow from this design. OCR is only as good as the pixels it sees, and it is only as good as the language model you point it at. Telling it the wrong language is a common reason for odd output, even on a perfect scan.
What affects accuracy
Resolution: The engine needs enough pixels per letter. As a rule of thumb, the lowercase letters in your body text should be roughly 20 or more pixels tall. A phone photo of a full A4 page taken at normal distance usually clears that easily. A screenshot of tiny text, or a page photographed from across a desk, often does not. Zooming in until the text fills the frame is better than relying on a later enlargement, because enlarging a small image only adds blur, not detail. The DPI and resolution guide explains how pixel counts map to page sizes.
Skew and rotation: Text lines that tilt by a few degrees are usually tolerated. A page that is sideways or upside down is not, and you will get a screen of nonsense. If your phone saved the photo with the wrong orientation, fix it with Rotate image first. Pages photographed at an angle, where the top is wider than the bottom, are harder still, because letters get squashed on one side. Retake the photo from directly above the page when you can.
Contrast and lighting: Dark text on a plain light background is ideal. Shadows from your hand or phone, a yellow tint from indoor light, and show-through from the reverse side of thin paper all lower accuracy. Natural light from a window, with the page flat, beats a flash that creates a glare patch. Faded thermal receipts and photocopies of photocopies are difficult for the same reason: the ink is no longer clearly darker than the paper.
Clutter around the text: Photos that include a table edge, fingers, a keyboard or a patterned background give the engine extra shapes to puzzle over. Cropping to the text block with Crop image removes distractions and often improves the result more than any other single step.
Fonts and layout: Plain printed fonts read well. Decorative display fonts, very small print, text on top of photographs, and handwriting do not. Handwriting recognition is not something this tool does reliably, so do not expect it to read a handwritten note. Multi-column pages can be read in the wrong order, with a line from column one joined to a line from column two. If that happens, crop each column and process it separately.
Choosing the language setting
The tool has three choices: Arabic plus English, Arabic only, and English only. Arabic plus English is the default because many real documents mix both. Use English only for a purely English page, since it is the most focused model and has no reason to hesitate over Latin letters. Use Arabic only if the page has no Latin text.
Choosing a single language does not stop the engine from producing something for characters outside it. It will try to read them as the closest shapes it knows, which gives garbage. That is why an English invoice processed as Arabic only comes back as strange symbols, and an Arabic letter processed as English only looks like scattered punctuation. If you are unsure, pick the combined option and check the result.
Arabic and mixed-language pages
Arabic is harder for OCR than English for structural reasons. Letters change shape depending on whether they sit at the start, middle or end of a word, and most letters join to their neighbours, so the engine cannot simply cut the line into separate characters. Dots above and below letters carry meaning: a stray speck can turn one letter into another. Short vowel marks, when printed, add small shapes above and below the line that compete with the dots. Print quality matters even more here than it does for English.
Direction is the other trap. Arabic runs right to left, but numbers inside Arabic sentences run left to right, and an English word embedded in an Arabic sentence reads left to right too. When you copy OCR output into a word processor, the order of these mixed runs can look scrambled even when the characters are correct, because the editor applies its own direction rules. Paste into an editor set to right-to-left paragraphs for Arabic text. Filebird removes the invisible direction marks the engine inserts around Arabic lines, since those marks tend to break copy and paste, but you should still read the result once against the original.
Digits deserve a check. Documents can use Western digits (0 to 9) or Eastern Arabic digits, and engines sometimes confuse similar shapes such as the Arabic zero (a dot) with a full stop. Always verify phone numbers, amounts and ID numbers against the source, whatever the language.
Scanned PDFs versus photos
Many PDFs already contain real text, and for those you do not need OCR at all. When you open a PDF in the tool, it first reads any existing text on each page. Only pages that have almost no extractable text, such as a scan, are rendered to an image and sent through OCR. The output is a single plain text file, and for multi-page PDFs each page is marked with a separator line showing its number, so you can find your place.
Scanned PDFs are limited by how they were scanned. If the source was a low-resolution fax or a compressed scan, the pages have little detail to work with, and no setting can restore it. If you have loose photos of a document, you can combine them first with JPG to PDF, though for OCR purposes it is just as easy to process the images one at a time.
HEIC photos from an iPhone and TIFF scans are decoded for you before recognition, so you do not need to convert them yourself.
A workable routine for a bad page
If a first attempt returns mostly nonsense, work through these in order. Check the orientation and rotate if needed. Crop away everything but the text. Retake the photo in better light, flat and straight on, if you can. Make sure the language matches the page. Run it again. If a few words are still wrong, correct them by hand in the text; fixing five errors is faster than retyping a page.
Remember that OCR output is a draft. For legal text, medical instructions, figures and names, read it against the original before you rely on it. If the tool finds no text at all, it says so instead of giving you an empty file.
Try it: open the OCR tool, choose the language, drop in your image or PDF and copy or download the text.
Frequently asked questions
Why does the first run take longer than the next ones?
The first time you use OCR in a browser, the recognition engine and language data have to be downloaded. They are then cached, so later runs start much faster. The time it takes to read the page itself depends on the image size and your device.
Can it read handwriting?
Not reliably. The engine is built for printed text. Neat block capitals sometimes come through, but ordinary cursive handwriting usually produces errors or nothing useful. For handwritten notes, plan to type them or use the image as a reference while you correct the output.
Why is my Arabic text in the wrong order after pasting?
The characters are usually right, but the editor you pasted into is displaying them with left-to-right rules. Switch the paragraph to right-to-left direction in your word processor or text field. Lines that mix Arabic with English words or numbers can still look odd, and may need small manual fixes.
Is my document uploaded to be read?
No. Recognition runs inside your browser on your own device. Only the engine code and language models are fetched from a public content network, and your image or PDF is never sent.