OCR PDF

Recognise text in scanned PDFs using Tesseract.js — entirely on your device.

Advertisement

How to ocr pdf

  1. 1

    Drop a scanned PDF.

  2. 2

    Pick the language of the document.

  3. 3

    Click Run OCR — download the recognised text.

Understanding ocr pdf

OCR — optical character recognition — reads pixels and works out which characters they represent. It is what turns a scanned PDF from a stack of pictures into a document you can search, copy from and index.

Each page is rendered with pdf.js and passed to Tesseract, an open-source engine compiled to WebAssembly. The engine downloads a language model on first use and then runs entirely on your machine, which is why a confidential scan can be OCR'd without uploading anything.

Accuracy depends overwhelmingly on input quality. A clean 300 DPI scan of printed text routinely exceeds 98% character accuracy; a phone photo of a crumpled receipt under warm light might reach 70%.

When you would use it

  • Making a scanned contract archive searchable.
  • Extracting figures from scanned invoices for bookkeeping.
  • Digitising printed research papers for note-taking.
  • Finding a clause in a hundred pages of scanned correspondence.

Practical tips

  • Scan at 300 DPI in greyscale — higher resolution rarely helps and slows processing considerably.
  • Deskew crooked pages first; even three degrees of rotation measurably hurts accuracy.
  • Pick the right language model. Running English OCR on French text mangles every accented word.

Troubleshooting

The first page takes a long time
The language model downloads once, then is cached. Subsequent pages are much faster.
Accuracy is poor
Increase scan resolution, improve lighting or contrast, and make sure the page is straight and fully in frame.

Frequently asked questions