Searchable PDF OCR
Make scanned PDFs searchable and copyable with OCRmyPDF and Tesseract, optionally as PDF/A.
Try an example: Scanned line of text (PNG) to a searchable PDF
How it works
Adds an invisible, selectable text layer to scanned PDFs (or a scanned JPG/PNG) using OCRmyPDF and Tesseract. Choose the document languages, straighten crooked scans, fix upside-down pages and optionally create a PDF/A for archiving. Reports how many pages were recognised and shows a sample of the extracted text.
- Images (JPG/PNG/TIFF) are first wrapped into a PDF with img2pdf. PDFs are validated with qpdf and decrypted with your password if needed.
- OCRmyPDF renders each page, lets Tesseract recognise the text in the chosen languages and lays the words as invisible text exactly over the image, so the page looks unchanged but can be searched and copied.
- "Leave them as they are" skips pages that already have text (born-digital pages stay untouched). "OCR every page" rasterises such pages too, which replaces their vector text with an image plus OCR text.
- Pages processed = pages without extractable text before (or all pages when forcing OCR). The text sample and character count are read back from the result with pdftotext.
- Without OCRmyPDF the server falls back to Tesseract alone: every page is rendered at 300 DPI in grayscale and rebuilt as image + text (deskew, rotation and PDF/A are then unavailable).
- Random internal names, dates and IDs are normalised so the same input gives the same file; PDF/A keeps its XMP metadata with the timestamps set to 2000-01-01.
OCR is not perfect: handwriting, low-resolution scans, unusual fonts and complex layouts produce errors. Check important text against the image.
For scripts and AI agents
- JSON API:
POST https://searchablepdfocr.usefulweb.site/api/v1/calculate(same calculation as this page) - Interface description: OpenAPI 3.1 · AI guide: llms.txt
- MCP server (Streamable HTTP):
https://searchablepdfocr.usefulweb.site/mcp· tool namesearchable_pdf_ocr
Example request
curl -s -X POST https://searchablepdfocr.usefulweb.site/api/v1/calculate \
-H 'content-type: application/json' \
-d '{…see OpenAPI examples…}'Related tools
- Secure PDF Redactor – Black out names, numbers or areas in a PDF for real: the text is removed, not just covered.
- PDF Compressor – Make PDFs smaller with Ghostscript presets or custom image DPI and JPEG quality, with previews.
- PDF ↔ Image Converter – Turn PDF pages into PNG or JPG images, or combine images into a PDF without quality loss.