OCR guide

How to Copy Text from a PDF (Even When Copy-Paste Doesn't Work)

Copy text out of a PDF into Word, email or WhatsApp. Fix broken line breaks, locked PDFs, and scanned PDFs that have no text at all.

By the Ocr4you Team ยท

Copying text from a PDF should be simple: select, copy, paste. In practice, you may find that nothing gets selected, that the pasted text has a line break after every few words, that Hindi turns into strange symbols, or that the PDF refuses to allow copying at all. Each of these problems has a different cause and a different fix. This guide explains them and shows how to get clean text out of any PDF.

Step 1: Find out what kind of PDF you have

Try to select a word with your mouse, or long-press on a phone.

  • Text highlights normally: the PDF is digital and contains real text. Copying is possible; any problems are about formatting or restrictions.
  • The whole page highlights as one box, or nothing happens: the page is an image, usually a scan. There is no text to copy until OCR recognises it.
  • It asks for a password to open: the PDF is encrypted. You need the password, as with e-Aadhaar, e-PAN and bank statements.

Digital PDF: extract all the text at once

Selecting text page by page is tedious for long documents. Instead:

  1. Open PDF to Text.
  2. Select the PDF. It is processed in your browser and not uploaded.
  3. Download the .txt file containing all the text, page by page, or copy it from the preview.

This tool copies the text that already exists in the PDF; it does not run OCR, so it is free and instant, but it will return little or nothing for scanned pages.

Scanned PDF: use OCR

For scans, the text must first be recognised. Use Scanned PDF to Text to get plain text, or PDF to Word (OCR) to get an editable document. OCR runs on our server and uses credits, with 16 free pages to start. If you would like to keep the PDF and make its text selectable for the future, Make PDF Searchable adds an invisible text layer; see our searchable PDF guide.

Fixing common copy-paste problems

A line break after every line

PDFs store text line by line, so pasting often keeps those breaks. Fixes:

  • Paste into Word and use Find & Replace to replace single paragraph marks (^p) with a space, after first protecting double breaks between real paragraphs.
  • Paste into Google Docs and use "Paste without formatting" (Ctrl+Shift+V), then join lines where needed.
  • For long documents, convert to Word with PDF to Word, which rebuilds paragraphs.

Words run together or have extra spaces

Some PDFs position each letter separately. Extraction tools have to guess the spaces. Try PDF to Text, which handles spacing well for most files; if the result is still poor, OCR on the page images may actually give cleaner text.

Hindi text turns into gibberish

This usually happens when the PDF was made with a legacy font such as Kruti Dev, where Hindi shapes are mapped to English letters. The extracted text looks like random Latin characters. Options: convert the text with a Kruti Dev to Unicode converter, or treat the pages as images and use OCR with Hindi selected, which outputs proper Unicode. Read Hindi OCR tips for accuracy advice.

Copying is disabled

Some PDFs have permission settings that ask readers not to allow copying, even though they open without a password. If the document is yours or you have the right to use its text, removing the restriction with Unlock PDF may help where the PDF has an owner password you know. Respect copyright: do not remove restrictions from documents you have no right to copy.

Text from columns comes out mixed

Newspapers and academic papers with two columns may paste with lines from both columns interleaved. Select one column at a time, or crop the page to one column with Crop PDF before extracting.

Tables paste as a jumble

Use PDF to Excel for tables in digital PDFs, or Convert to Excel (OCR) for scanned ones. See our PDF to Excel guide.

Copying text on a phone

On Android and iPhone, long-press a word in the PDF viewer, then drag the handles to extend the selection. It works for short passages. For long sections, PDF to Text in your phone's browser is faster: download the .txt file and open it in any notes app, or copy from the preview into WhatsApp or email.

What about images inside the PDF?

If you need the pictures rather than the text, use Extract Images from PDF, explained in our image extraction guide. For text inside those images, run them through Image to Text, as described in how to copy text from an image.

Respect copyright

Extracting text for your own notes, research or accessibility is common and generally fine. Republishing large parts of copyrighted books, reports or paid study material is not. Cite your sources when you quote.

Summary

ProblemFix
Long digital documentPDF to Text (free, in browser)
Scanned PDFScanned PDF to Text or PDF to Word (OCR)
Broken line breaksPaste as plain text and join lines, or convert to Word
Hindi gibberishLegacy font converter or OCR with Hindi
TablesPDF to Excel

Try it now: PDF to Text is free to start and works on mobile and desktop.

Open PDF to Text

Related guides