How to OCR a scanned PDF and make it searchable

A scanned PDF is a picture, not text — you cannot search, select or copy it. This guide shows the two pdfmcp routes, both on your device: OCR to plain text in your browser, or OCR to a searchable PDF with the local package, with the settings that actually matter.

Why a scanned PDF has no text

A scanner saves a photograph of each page. The words are pixels in an image, not characters, so search finds nothing, selecting text selects nothing, and copy-paste has nothing to copy. OCR (optical character recognition) fixes that: it reads the image of each page and works out which characters the pixels form.

pdfmcp uses Tesseract for this. There are two OCR operations, and they answer two different needs. ocr_pdf gives you back a PDF that looks the same but carries an invisible text layer, so the document itself becomes searchable and selectable. ocr_to_text gives you back the words alone, as plain text.

Pick the route: text in the browser, or a searchable PDF locally

Choose ocr_to_text in your browser when you only need the words — to paste into a note, feed to a script, or read what a scan says. It runs on your device, in your browser, and your file is never uploaded; note that the on-device web version bundles English only.

Choose ocr_pdf when the document has to stay a document — a contract, a report, an archive file that other people will open, search and quote from. It runs in the local package on your machine, because making a clean searchable PDF takes desktop-grade machinery. Pages that already carry a text layer are passed through unchanged and reported as skipped, so running it on a mixed document is safe. The local package uses the Tesseract program on your machine: if it isn't installed, the tool tells you the exact install command, and its language data downloads once, verified, on first use.

Make a searchable PDF, step by step

1) Install the local package: pip install https://pdfmcp.org/downloads/pdfmcp-4.2.1-py3-none-any.whl — or skip the install and use the uvx config from the MCP page. 2) Run the ocr_pdf operation on your file — through an MCP-connected agent (connect once, then just ask it to OCR the scan), or from Python with the local runtime: rt.run_sync("ocr_pdf", {}, [base64_of_your_file]). 3) The result comes back inline; save it wherever you keep the document. Everything happened on your machine.

Either way, open the result and test it: search for a word you can see on the page. If search finds it and highlights it in the right place, the text layer is in.

The settings that matter: language, DPI and pages

Language is the setting people get wrong most often. The default is eng (English). For other languages, set the language parameter to the Tesseract language code, or combine codes — eng+deu for a document mixing English and German, for example. Picking the language the document is actually written in matters far more than any other setting.

DPI defaults to 300 and can be set between 150 and 600: it is the resolution each page is rendered at before recognition. Leave it at 300 for normal scans; a higher setting can help small print, at the cost of a slower job. Finally, the pages parameter limits work to the pages you name — 1-3,5,8, for example — which is the fastest way to test your settings on a few pages before running a long document.

Limits, privacy and the honest edges

There is no quota: OCR runs on your machine, so you can run it all day. The practical limits are your hardware and the operation's own sanity checks — very long documents take real time, and splitting a huge scan into parts is often faster than one giant run.

Privacy follows the usual pdfmcp rule with no exceptions: both OCR routes process your file on your device — the browser tool never uploads it, and the local package never sends it anywhere. And the honest edge: OCR reads printed text from a reasonably clear scan. Handwriting, very low-contrast scans and damaged pages will produce errors — the output is a best-effort text layer, not a certified transcription, so check important names and numbers against the page image.

Try it free in your browser

Frequently asked questions

Is OCR free on pdfmcp?

Yes — free forever, with no sign-up and no quota. The browser OCR-to-text tool needs nothing; searchable-PDF OCR runs in the free local package (Tesseract must be installed on your machine; the tool gives the exact command if it isn't).

Will OCR change how my PDF looks?

ocr_pdf adds an invisible text layer; the page images stay as they were. Pages that already have text are passed through unchanged and reported as skipped.

Which languages can OCR read?

In the local package, set the language parameter to a Tesseract language code (eng by default; combinations like eng+deu work). The on-device web OCR-to-text tool bundles English only.

Does OCR work on handwriting?

It is built for printed text. Handwriting and poor-quality scans may produce errors, so verify critical details against the original page image.

Is my scan uploaded for OCR?

No. Both routes run on your device — in your browser, or in the local package on your machine.