Runs in your browser with pdf.js, pdf-lib and Tesseract

PDF OCR Online — make scanned PDFs searchable and copy their text, in English, Hindi, Gujarati and more

Turn a scan into a PDF you can search, select and copy from, with the pages looking exactly as before. Read English and 20 other languages, see how sure the OCR is on every page, and download the text too. The PDF never leaves your device.

See how it works
  • PDF files aren't uploaded to our server
  • Searchable PDF
  • 21 languages, mixed too
  • Confidence for every page

Read the text in a scanned PDF

Add a PDF, pick the languages it is written in, then get a searchable PDF and the text. Pages that already have text are skipped.

Works on one PDF at a time. The original file is never changed.

Drop your PDF here

or browse — one PDF, any number of pages

Page 1

What this tool does

OCR turns a picture of text back into words

A scanned PDF is a stack of photos: you can't search it, select it or copy from it. OCR (optical character recognition) reads the letters in those photos.

What you get

  • A searchable PDF: every page looks exactly as before, with invisible text on top that you can search, select and copy.
  • The text itself, to edit, copy or download as a .txt file, plus a .json file with every word and where it sits.
  • 21 languages, including Hindi, Gujarati, Marathi, Bengali, Tamil, Telugu, Kannada, Malayalam, Punjabi and Urdu, and up to four at once for bilingual pages.
  • A confidence score for every page, and words the OCR wasn't sure about marked in yellow, so you know what to check.
  • Pages that already have text are found and skipped, so a mixed PDF is handled in one go.

What it can't do

  • Read handwriting reliably. It is made for printed text; very neat block letters may work.
  • Keep tables, columns and fonts as a Word layout. The text comes out in reading order; use PDF to Word for an editable layout.
  • Fix upside-down or badly tilted scans. Turn the pages upright first for good results.
  • Be perfect. Even a clean scan has the odd wrong letter, so check names, numbers and amounts.

How to OCR a PDF in four steps

Pick the languages, choose what to make, read, check.

Add your PDF

Drop a scanned PDF onto the upload area, or click Select PDF. Each page shows whether it already has text.

Tick the languages

  • Tick every language printed on the pages.
  • English and Gujarati for a bilingual form, for example.
  • Your choice is remembered for next time.

Choose what to make

Searchable PDF and text, or text only. Use Small print for tiny text, and Clean up for faint, grey or colored scans.

The first run downloads the OCR engine and languages once; after that it starts quickly.

Read, check, download

Click the button. Check pages with a low score and the yellow words, fix the text if needed, then download the PDF or the text.

  • Pages look the same
  • Checked after saving
  • Nothing uploaded

From a flat scan to text you can search

One scanned page, before and after OCR.

Scanned PDF Picture only
Scanned PDF page with no selectable text before OCR
Nothing to copy, nothing to search: just a picture of text.
After OCR
Text you can use Searchable
Extracted searchable text after running OCR
Selectable, searchable text, ready to copy, edit or export.

What to set for your document

Common scans and the settings that read them best.

DocumentWhat mattersWhat to set
Scanned contract or letterSearch it later, keep its look.English, Searchable PDF and text, Standard.
Gujarati or Hindi government formBoth scripts on one page.Tick English and Gujarati (or Hindi), Standard.
Old book or typed pageFaded ink, yellow paper.Clean up on, Small print for small type.
Phone photo of a receiptSmall print, uneven light.Small print and Clean up on; check the amounts by hand.
PDF with some scanned pagesOnly the scans need reading.Pages to read: Pages without text.
Text for a report or emailJust the words.Text only, then Copy text.
Data for a programWords with their positions.Download .json: every word with its box and score.

The details

What each setting actually does

How the pages are read and saved, in plain terms.

Languages

Each language teaches the OCR its letters and common words. Tick only what is on the page: extra languages slow it down and can swap similar letters.

Quality

Each page is drawn at 300 dpi for reading, or 400 dpi with Small print. More detail helps tiny text but takes longer.

Clean up

Turns the page grey and stretches its darkest and lightest tones to full black and white, which helps faded ink and colored paper. It only affects reading, not your pages.

Searchable PDF

Every word is placed as invisible text exactly over where it appears, so search finds it and selecting highlights the right spot. The scan itself isn't recompressed.

Confidence

How sure the OCR is about each page, from 0 to 100%. Over 90% is usually clean; under 75% is flagged for checking, and words under 60% are marked yellow.

Privacy

The OCR engine (Tesseract) and language data are downloaded from the jsDelivr CDN the first time and kept by your browser. The PDF itself is read on your device and never uploaded.

When the text comes out wrong

Identify the problem, then use the matching fix.

Symptom
Why it happens
Fix

Gibberish or wrong letters

The language ticked doesn't match the page.

Tick the language actually printed, such as Gujarati, and read again.

Low score on small text

The letters are only a few pixels tall at 300 dpi.

Choose Small print (400 dpi).

Faint or colored scan reads badly

Low contrast between ink and paper.

Turn on Clean up and read again.

"No text found" on a page with text

The page is upside down or sideways, or it is handwriting.

Turn the page upright first. Handwriting isn't supported well.

"The OCR engine didn't load"

A network filter or ad blocker blocks cdn.jsdelivr.net.

Allow cdn.jsdelivr.net for this site, or try another network.

A password-protected PDF won't open

Encrypted PDFs can't be read by the in-browser PDF libraries.

Remove the password with Unlock PDF, then add the unlocked copy.

Getting clean text on the first pass

Habits that make OCR far more accurate.

Scan at 300 dpi

Set the scanner or scanning app to 300 dpi, black and white or greyscale. It is the sweet spot for printed text.

Keep pages straight

Lay the page flat and square. A tilt of a few degrees already costs accuracy.

Match the languages

Tick exactly the languages on the page. For a Gujarati form with English labels, tick both.

Check numbers by hand

Amounts, dates, PAN and account numbers matter most and have no words around them to help. Compare them with the scan.

Use the yellow marks

Start your proofreading with the pages under 75% and the yellow words; that's where the mistakes are.

Shrink big scans afterwards

Scanned PDFs are large. Run the searchable copy through Compress PDF before you email it.

Common questions about PDF OCR

If something's not covered here, the troubleshooting section above likely has it.

Is my PDF uploaded to a server?

No. The PDF is opened and read in your browser with pdf.js, pdf-lib and Tesseract. Only the OCR engine and the language data are downloaded from the jsDelivr CDN, the first time you use them; your file never leaves your device.

What is a searchable PDF?

The same pages as your scan, with invisible text placed exactly over each word. The pages look unchanged, but you can search them, select and copy the text, and other tools can index them.

Can it read Gujarati, Hindi and other Indian languages?

Yes. It reads Hindi, Gujarati, Marathi, Bengali, Tamil, Telugu, Kannada, Malayalam, Punjabi, Urdu, Odia, Sanskrit and Nepali, along with English and other languages. Tick every language on the page, up to four at once.

How accurate is it?

On a clean 300 dpi scan of printed text it is usually above 90% sure. Faint, small, tilted or handwritten text reads worse. Each page gets a confidence score, and unsure words are marked in yellow so you know what to check.

Can it read handwriting?

Not reliably. The OCR is made for printed text; very neat block letters may come out, but joined-up handwriting usually won't.

What happens to pages that already have text?

They are found and skipped by default, so a PDF with a few scanned pages is handled in one go. Choose All pages to read them anyway.

Why does the first run take longer?

The OCR engine and each language are downloaded once, about 1 to 4 MB per language, and kept by your browser. Later runs start almost at once.

Build notes

How this PDF OCR tool works under the hood

I wrote up how to build a browser-based OCR tool with pdf.js and Tesseract.js: drawing pages to a canvas, running the OCR in a web worker, and exporting the text, all on your own device.

Published on freeCodeCamp

How to Build a Browser-Based PDF OCR to Text Converter Using JavaScript

Covers browser-based OCR with pdf.js and Tesseract.js, and client-side document processing that keeps files private on the user's device.

Read the write-up on freeCodeCamp

Written by Bhavin J. Sheth, founder of AllInOneTools