How to use PDF & Image OCR
Extract machine-readable text from scanned PDFs and images directly in your browser using Tesseract.js, an open-source OCR engine ported to WebAssembly. No file ever leaves your device. Upload a scanned document, photograph, or image-only PDF and receive the recognized text instantly — ready to copy, search, or download. Supports dozens of languages including English, French, German, Spanish, Chinese, and Arabic.
- Upload a scanned PDF or image file (JPG, PNG, TIFF, or BMP) using the file picker.
- Select the primary language of the document for best recognition accuracy.
- Click "Run OCR" — Tesseract.js processes the file entirely in your browser via a Web Worker.
- Review the recognized text in the output panel and correct any errors.
- Copy the text to the clipboard or download it as a plain-text file.
Your data never leaves your device — 100% private processing.
How Tesseract.js OCR works in the browser
Tesseract.js is a WebAssembly port of Google's Tesseract OCR engine. It pre-processes each page image (binarization, deskewing, noise removal), segments the image into text lines and words, then applies a neural-network-based classifier to recognize character sequences. The output includes a confidence score per word. Because the entire pipeline runs in a Web Worker on the client, no image data is ever transmitted — critical for invoices, medical records, passports, and legal documents.
OCR accuracy: what affects recognition quality
Recognition accuracy depends primarily on scan resolution, image clarity, and font style. Scans at 300 DPI or higher yield significantly better results than 150 DPI scans. Printed text in common fonts (Arial, Times New Roman) achieves near-perfect accuracy; handwriting, decorative fonts, and highly stylized text are less reliable. Selecting the correct language model is critical — using the English model on a French document degrades accuracy considerably. Deskewing a tilted scan and removing dark borders before running OCR further improves results.
| Factor | Best setting | Impact on accuracy |
|---|---|---|
| Scan resolution | 300 DPI or higher | High — directly affects character clarity |
| Image contrast | High contrast, black on white | High — low contrast causes missed characters |
| Font type | Standard printed serif/sans-serif | Medium — decorative fonts reduce accuracy |
| Language model | Match document language | High — wrong language degrades word recognition |
| Document skew | Deskewed / straight | Medium — tilted pages split words incorrectly |
Searchable PDFs and the invisible text layer
Some PDF workflows require not just extracted text but an invisible text layer overlaid on the original scanned images — this is what makes a scanned PDF Ctrl+F searchable in Adobe Reader or a browser's built-in PDF viewer. This technique positions Tesseract's word bounding boxes as transparent text on top of each page image. The visual appearance is unchanged but the document becomes fully searchable and screen-reader accessible. For archiving scanned records, a searchable PDF with an embedded text layer is the professional-standard output format.
Glossary
- OCR
- Optical Character Recognition — software that analyzes an image of text and converts it into machine-readable, editable characters.
- Tesseract.js
- A JavaScript/WebAssembly port of Google's Tesseract OCR engine that runs entirely in the browser without any server calls.
- Text layer
- An invisible layer of selectable, searchable text added on top of a scanned page image inside a PDF, making it Ctrl+F searchable.
- Binarization
- A pre-processing step that converts a grayscale scan to pure black-and-white pixels to improve OCR character segmentation accuracy.
- Confidence score
- A percentage (0–100%) that Tesseract assigns to each recognized word, indicating the engine's certainty about the recognition result.
Related reading
Frequently Asked Questions
Why use PDF & Image OCR?
- Makes scanned documents fully text-searchable and copy-pasteable without any server processing
- Supports dozens of languages including French, German, Spanish, Chinese, and Arabic
- Provides per-word confidence scores so you can quickly spot which text needs correction
- Creates an invisible searchable text layer over scanned images for professional archival output
Common use cases
- Extract text from a scanned contract to search for specific clause keywords in a PDF reader
- Convert a photographed receipt into machine-readable text for importing into expense software
- Make a decade of scanned medical records Ctrl+F searchable without re-scanning the originals
- Pull data from a scanned government form into a spreadsheet by copying recognized text
- Digitize printed research notes into an editable text file for further academic writing
Get weekly tool tips & updates
New tools, power-user tips, and productivity hacks — delivered free every Friday.
No spam, ever. Unsubscribe with one click.
Related PDF Tools
PDF to JPG Converter
Convert PDF pages to JPG images online. Extract all pages or specific pages as high-quality JPEG images. Free, private, runs in your browser.
Image to Text (OCR)
Extract text from images and photos with OCR. Supports many languages, runs in your browser, and never uploads your files. Free and private.
OCR — Image to Text Converter
Extract editable text from images and scanned PDFs with OCR. Upload a photo, screenshot, or scan and get accurate, copyable text in seconds. Free.
Base64 to PDF
Paste a Base64 string or data URI and convert it into a downloadable PDF instantly. Includes validation, preview, and in-browser processing for privacy.
Organize PDF Pages
Reorder, rotate, and delete pages in a PDF online. Drag-free page management with thumbnails, then download the rearranged PDF. Free and private.
Merge PDF Files
Combine multiple PDF files into one in seconds. Free, fast, and private — your files never leave your browser, so your documents stay secure.
Explore all PDF Tools.