Table of contents
Every scanned document, photo of a receipt, screenshot of a table, and image-based PDF contains text that cannot be selected, searched, or copied. OCR — Optical Character Recognition — solves this by converting those images into real, editable text.
This guide explains how OCR works, what affects its accuracy, and how to extract text from any image or document for free.
What OCR actually does
When you scan a document or photograph text, your device captures an image — a grid of colored pixels. There is no text data stored, just pixels arranged to look like letters. You can see the text, but your computer cannot read it.
OCR analyzes those pixels and answers: what letter does this shape look like? It does this for every character on the page, assembling the results into a text string that a computer can process — search, copy, edit, translate, or index.
Modern OCR engines use machine learning models trained on millions of document samples. This is a significant improvement over older template-matching systems and allows modern tools to handle variable fonts, slight page skew, and mixed languages.
The OCR pipeline: what happens to your image
OCR is not a single step — it is a sequence of operations:
1. Preprocessing
Before character recognition begins, the image is cleaned up:
- Deskewing: If the document was scanned at a slight angle, the image is rotated to straighten the text lines
- Denoising: Random pixel noise is smoothed out
- Binarization: The image is converted to pure black and white (text becomes black, background becomes white) to maximize contrast
- Contrast enhancement: Faded or uneven text is boosted
2. Layout analysis
The engine identifies the document's structure:
- Separates text regions from images, tables, and graphics
- Identifies text columns, paragraphs, headers, and footers
- Detects text orientation (horizontal, vertical, or rotated)
3. Character segmentation
Within each text region, individual characters or words are isolated. This is harder than it sounds — connected handwriting, overlapping characters, and variable spacing all complicate segmentation.
4. Character recognition
Each segmented character is compared against the engine's trained model to determine the most likely match. The engine considers context — a character that looks like both 0 and O is more likely O if it appears in a word context.
5. Post-processing
The recognized text is assembled into words and sentences. Spell-checking and language models can correct obvious recognition errors by flagging outputs that do not match known words.
What affects OCR accuracy
OCR accuracy is not fixed — it varies significantly based on input quality.
Image resolution
Resolution is the single biggest factor. OCR accuracy improves dramatically with higher DPI (dots per inch):
| Resolution | OCR accuracy |
|---|---|
| 72 DPI (screen resolution) | Poor — many errors |
| 150 DPI | Fair — noticeable errors |
| 300 DPI | Good — industry minimum for OCR |
| 400–600 DPI | Excellent — professional quality |
For documents you plan to OCR, always scan at 300 DPI minimum. 600 DPI is better for small print or documents with fine detail.
Text and background contrast
OCR works best on black text on a white background. Reduced contrast — light text on a light background, colored text on a patterned background, or text over images — significantly reduces accuracy.
Before running OCR, improve contrast with image editing tools or use the preprocessing options in your OCR software.
Font and text size
Clear, standard fonts are easy to recognize. OCR accuracy drops for:
- Very small text (below 8pt in the source document)
- Decorative or stylized fonts
- Very light or condensed fonts
- Text with tracking or kerning extremes
Image quality
JPEG compression introduces artifacts around text edges — blocky patterns and blurring. These artifacts look like part of the character to the OCR engine and cause misreadings. Use PNG or TIFF for OCR source images, or use the highest JPEG quality setting available.
Page orientation
Text printed at angles, curved text on book spines, or text on photographs taken from an angle reduces accuracy. Most OCR engines auto-correct slight skew (up to about 15 degrees), but severe angles require manual correction first.
Common OCR use cases
Making scanned PDFs searchable
The most common use case. Older PDFs created from scanned documents contain only image data — you cannot search or select text. Running OCR adds a text layer to the PDF without changing its visual appearance. The resulting file is "searchable" — your PDF reader, browser, and search tools can find words in it.
Use the FixTools OCR PDF tool to add a text layer to any scanned PDF in your browser, with no software to install.
Extracting text from receipts and invoices
Photos of receipts and invoices taken with a phone camera are a common source for expense tracking and bookkeeping. OCR can extract the vendor name, date, amounts, and line items, which can then be entered into accounting software without manual typing.
Tip: Take receipt photos straight-on in good lighting. Angled photos from above dramatically reduce accuracy.
Digitizing physical documents
Books, journals, legal documents, and historical records on paper can be scanned and OCR'd to create searchable digital archives. Libraries and universities do this at scale; the same process applies to personal document management.
Extracting data from screenshots
Screenshots of tables, reports, or data from apps you cannot export from can be run through OCR to extract the data. This is useful for getting data out of tools that do not offer export functionality.
Converting image-based forms
Forms printed and filled by hand can be photographed and OCR'd to extract the typed or handwritten responses, though handwriting accuracy will vary.
How to extract text from a scanned PDF
For PDFs that contain scanned pages (images), the process is:
- Upload the PDF to the FixTools OCR PDF tool
- The tool analyzes each page image and runs character recognition
- A text layer is added to the PDF — pages now have selectable, searchable text
- Download the processed PDF
If you want to convert the scanned PDF into an editable Word document, use the PDF to Word Converter after adding the text layer with OCR. The conversion works best once the text layer exists.
Preparing images for better OCR results
Before running OCR on a low-quality image, improve it:
Increase resolution: If possible, rescan the document at 300 DPI or higher rather than using an existing low-resolution image.
Straighten the image: Correct rotation and perspective distortion before running OCR. Most phone camera apps have a document scan mode that corrects this automatically.
Improve contrast: For faded or low-contrast documents, boost contrast in a photo editor or use the preprocessing options in your OCR tool.
Crop to the text area: Remove unnecessary borders, shadows, and background. A focused crop gives the OCR engine less to process and reduces errors from edge artifacts.
Reduce noise: For images with heavy grain or noise (common in old photocopies), apply a denoising filter before OCR.
If your source image is large and needs to be reduced before uploading, the FixTools Image Compressor can reduce file size while preserving quality — useful for staying within upload size limits without losing the detail OCR needs.
Supported languages
Most OCR engines support dozens of languages. The common open-source engine, Tesseract, supports over 100 languages. Language selection matters because OCR uses language models to distinguish ambiguous characters and correct recognition errors.
If you are processing a document in a language other than English, select the correct language in your OCR tool. Using the wrong language model significantly reduces accuracy because the engine's built-in dictionary and character frequency models do not match the text.
Handwriting recognition
Modern OCR tools include handwriting recognition, but results vary. Block-printed handwriting is much easier to recognize than cursive. The key factors:
- Consistency: Consistent letter shapes help the engine build internal models
- Spacing: Clear gaps between words reduce segmentation errors
- Contrast: Dark ink on white paper, good lighting if photographed
- Simplicity: Standard letter forms are recognized more reliably than personal style variations
Always review OCR output from handwritten documents — even 90% accuracy means one error every ten words, which requires significant correction in a long document.
Extract text from your documents now
For scanned PDFs with no selectable text, the FixTools OCR PDF tool adds a text layer to any PDF in your browser. No software to install, no account required. Once processed, you can search, select, and copy text from any page.
For converting a scanned PDF into a fully editable Word document, use the PDF to Word Converter after OCR processing.
Try it free — right in your browser
No sign-up, no uploads. Your data stays private on your device.
Frequently asked questions
6 questions answered
QWhat is OCR and how does it work?
OCR stands for Optical Character Recognition. It is technology that analyzes an image and identifies letter shapes, then matches those shapes to characters in a known alphabet. Modern OCR uses machine learning models trained on millions of document images. The process involves preprocessing the image (deskewing, contrast adjustment), detecting text regions, segmenting individual characters or words, recognizing each character, and assembling the results into a text string. Accuracy depends on image quality, font clarity, and background contrast.
QWhat types of files can OCR process?
OCR works on any file that contains text as an image rather than as actual text data. This includes scanned PDF documents where pages were photographed or photocopied, image files like JPG, PNG, TIFF, and BMP that contain text, screenshots of documents, apps, or websites, photos taken with a phone or camera showing signs, receipts, documents, or labels, and PDF files created from scans where the text layer is missing.
QHow accurate is online OCR?
For high-quality scans and clear printed text, modern OCR regularly achieves 99%+ accuracy. For handwritten text, unusual fonts, low-resolution images, or text with background noise, accuracy drops significantly. The main factors affecting accuracy are image resolution (higher is better, 300 DPI minimum), contrast between text and background, straightness of the text (skewed text reduces accuracy), font size (very small or very large text is harder), and image quality (blur, compression artifacts, noise).
QCan OCR extract handwritten text?
Yes, but with significantly lower accuracy than printed text. Modern OCR engines include handwriting recognition (sometimes called ICR — Intelligent Character Recognition), but accuracy depends heavily on handwriting clarity and consistency. Neat, block-letter handwriting can achieve 80-90% accuracy. Cursive, casual, or unclear handwriting may fall below 50%. For critical handwritten documents, OCR output should always be manually reviewed and corrected.
QWhy does my scanned PDF not have searchable text?
When a physical document is scanned, the scanner captures a photograph of the page. That photograph is stored as an image inside the PDF — no actual text data is present. The document looks like text on screen but is just pixels. A PDF created this way cannot be searched, selected, or copied. Running OCR on the scanned PDF analyzes those pixel images and adds a hidden text layer, making the document fully searchable and selectable while the visual appearance stays unchanged.
QWhat is the best image format for OCR accuracy?
TIFF and PNG are the best formats for OCR because they use lossless compression, preserving every pixel of the original image. JPEG compression introduces artifacts (blurring, block patterns) around text edges that reduce recognition accuracy. If your image source produces JPEGs — like a phone camera or scanner — use the highest quality setting possible to minimize compression artifacts. For best results, scan at 300 DPI or higher in black and white or grayscale.
O. Kimani
Software Developer & Founder, FixTools
Building FixTools — a single destination for free, browser-based productivity tools. Every tool runs client-side: your files never leave your device.
About the authorRelated articles
How to Convert PDF to Word Free Online (Without Losing Formatting)
Turn any PDF into an editable Word document for free in your browser. No software, no signup, no watermarks. Formatting preserved.
Read articleImages & MediaHow to Optimize Images for Website Speed (Without Blurry Results)
Images are the number one cause of slow websites. Learn how to compress, resize, and convert images to the right format so your pages load faster without sacrificing quality.
Read article