How to Extract Text from a Scanned PDF Using OCR

Illustration: How to Extract Text from a Scanned PDF Using OCR

You open a PDF, try to copy a sentence, and nothing highlights. That's a scanned PDF: each page is a picture of text, not text itself. Optical character recognition (OCR) fixes this by reading the letters in the image and turning them into real, editable text.

How OCR works, in brief

OCR software looks at the image of each page, finds the areas that contain text, and recognizes the shapes of individual characters and words. Modern OCR uses machine-learning models trained on huge numbers of documents, so it handles most printed fonts well.

Extract text from a scanned PDF

  1. Open PDF to Text.
  2. Upload your PDF. This engine accepts files up to 10 MB and 20 pages.
  3. Run OCR and wait while each page is read.
  4. Copy the extracted text, or download it.

Got a longer document? Use the PDF Splitter to cut it into parts of 20 pages or fewer, then process each part.

How to get more accurate OCR results

  • Straighten pages. Rotate sideways or upside-down pages with Organize PDF Pages before running OCR.
  • Use clear scans. 300 DPI is a good scanning resolution for text. Avoid blurry phone photos and strong shadows.
  • Prefer high contrast. Dark text on a light background is ideal. Faded print and coloured paper reduce accuracy.
  • Proofread numbers and names. OCR can confuse similar characters, such as 5 and S or rn and m.

Need Markdown instead of plain text?

If the text is going into a wiki, a GitHub README, Notion, Obsidian or an AI assistant, PDF to Markdown is a better fit. It produces Markdown output, uses OCR when a page contains images, and shows the document's metadata.

What about tables?

Plain OCR output flattens tables into lines of text. To keep rows and columns, use PDF Table Extraction, which works best on digital PDFs.

What you can do with the text

  • Search old archives and scanned books.
  • Quote or edit scanned contracts and letters.
  • Translate or summarize the content.
  • Make documents more accessible to screen readers.

Check first: does the PDF already contain text?

OCR is slow compared with reading text that’s already in a PDF, so check first. Try selecting a word in your PDF reader. If you can highlight individual words, the PDF has a text layer and our in-browser PDF to Text tool extracts it in a second or two without uploading anything. It also tells you which pages have no text, so you only need to OCR those.

Preparing scans for better OCR

  • Resolution: scan at 300 DPI. Below about 200 DPI, accuracy drops sharply, especially for small print.
  • Orientation: OCR engines expect upright text. Fix sideways pages first with Organize PDF Pages.
  • Only what you need: extract the relevant pages with Split PDF. Smaller files process faster and are less likely to time out.
  • Contrast: grayscale scans of black text on white paper work best. Coloured paper or faint photocopies benefit from your scanner’s “text” or “document” mode.

Try it now

Free, no sign-up, and your file stays on your device.

Open PDF to Text

We write our guides from hands-on use of the tools described. Spotted something out of date? Let us know.