Skip to content
100% local · 0 KB uploadedCompress PDF

How to Extract Text from a PDF

🔒 Your files never leave your device. All processing happens locally in your browser.

Extracting text from a PDF is one of the most common PDF tasks — you have a report, a contract, or a research paper as a PDF and you need the text in a word processor, a spreadsheet, a search index, or just a place where you can copy and paste it. This guide covers three free methods, with honest privacy trade-offs for each. The first method — IXPDF's PDF to Text tool — runs entirely in your browser and never uploads your file. The second uses your browser's built-in PDF viewer for quick copy-paste. The third uses Google Docs, which works but uploads your file to Google's servers. For each method, we explain when to use it and when to reach for something else.

Why extract text from a PDF

PDFs are designed for viewing and printing, not for editing. The text inside a PDF is stored in a content stream that is optimized for layout, not for re-use. But there are many reasons you might want the text out:

  • Copy-paste into another document. You need to quote a passage in an email, a report, or a citation, and the source is a PDF.
  • Search indexing. You want to build a local search index over a library of PDFs and need the text content.
  • Accessibility. Screen readers and other assistive technologies work better with plain text than with some PDFs.
  • Data analysis. You need to extract tables, numbers, or key phrases for analysis in a spreadsheet or a script.
  • Translation. You want to run a translation tool on the text of a PDF document.

Whatever your reason, the goal is the same: get the text out of the PDF and into a format you can work with. The methods below all do that — the difference is how they handle your file and how accurate the result is.

Method 1: IXPDF PDF to Text tool (recommended, local)

IXPDF's PDF to Text tool reads the text content stream of each page using PDF.js in a Web Worker. The file stays in your browser — it is never uploaded to any server. The extracted text is shown in an in-page preview and offered as a .txt download, with a copy-to-clipboard button for pasting into other apps.

  1. Open the PDF to Text tool at/tools/pdf-to-text/.
  2. Select your PDF. Drag the file onto the dropzone or click to browse. The file name and size appear below.
  3. Optionally limit pages. The Page range field accepts values like 1,3,5-7. Leave it empty to extract text from every page.
  4. Optionally preserve layout. Check Preserve layout to insert line breaks based on the page layout. This produces text closer to the visual reading order. Uncheck it for full-text search and copy-paste where layout does not matter.
  5. Run extraction. Click Run PDF to Text. The tool reads the text content stream of each page in a Web Worker on your device.
  6. Preview, copy, or download. The extracted text is shown in a preview area with a per-page breakdown. Copy it to the clipboard or download it as a .txt file.
Private by design
Your file never leaves your device. All processing happens in your browser's Web Worker — no upload, no server, no account. The extracted text is also local: it goes to your clipboard or your downloads folder, nowhere else.

Method 2: Copy-paste in your browser's PDF viewer

Modern browsers (Chrome, Edge, Firefox, Safari) have a built-in PDF viewer that can open PDFs directly. If the PDF has a real text layer (not scanned), you can select text with the mouse and copy it withCtrl+C / Cmd+C. This is the fastest method for small excerpts — no tool, no upload, no install.

  1. Open the PDF in your browser. Double-click the file, or drag it onto a browser tab. The browser's built-in PDF viewer opens it.
  2. Select the text. Click and drag over the text you want. If nothing highlights, the PDF is likely scanned — see the troubleshooting section below.
  3. Copy. Press Ctrl+C / Cmd+Cor right-click and choose Copy.
  4. Paste. Switch to your target document and pressCtrl+V / Cmd+V.

This method is great for a few sentences or a paragraph. It gets tedious for whole documents — you have to select each page separately, and the selection may not carry over page breaks cleanly. For whole-document extraction, use Method 1.

Method 3: Google Docs import (works, but uploads to Google)

Google Docs can open a PDF and convert it to an editable document. This works well for PDFs with complex layouts, and the result is a Google Doc you can edit, share, or export as .docx. The trade-off is privacy: uploading the PDF to Google means Google has a copy. If the document is sensitive, use Method 1 instead.

  1. Go to Google Drive. Sign in atdrive.google.com.
  2. Upload the PDF. Drag the file into Drive or clickNew → File upload. The file is now on Google's servers.
  3. Open with Google Docs. Right-click the PDF and choose Open with → Google Docs. Google converts the PDF to an editable document.
  4. Copy or export the text. Select all withCtrl+A, copy with Ctrl+C, and paste wherever you need it. Or use File → Download → Plain text (.txt)to export the whole document.
Privacy trade-off
This method uploads your PDF to Google's servers. Google processes the file to convert it, and the original PDF remains in your Drive until you delete it. If the document contains sensitive, confidential, or personal information, use IXPDF PDF to Text instead — it runs locally and never uploads anything.

Troubleshooting: scanned PDFs and OCR

If none of the methods above produce text — the IXPDF tool returns an empty result, the browser viewer will not let you select anything, and Google Docs imports an image with no text — the PDF is most likely scanned. A scanned PDF is a photograph of paper: each page is one big image, and there is no text in the content stream. No amount of copy-paste or text extraction will get text out of an image. The fix is OCR (optical character recognition), which analyzes the image and writes a new text layer into the PDF.

IXPDF cannot perform OCR in the browser today. Browser-based OCR engines exist (Tesseract.js, OCRad.js) but their accuracy on real-world scans is not reliable enough to ship — they misread common fonts, struggle with multi-column layouts, and produce text that is worse than no text at all for search and accessibility. We will not ship a tool that quietly returns wrong text. SeeHow to Make a PDF Searchable for trusted local OCR tools (Adobe Acrobat, Tesseract, macOS Preview Live Text, ABBYY FineReader) that run on your machine without uploading your file.

For a deeper dive on why text selection fails and how to diagnose the cause (scanned, image-only, flattened, or broken font encoding), seeWhy Can't I Select Text in a PDF?.

Which method should I use?

  • Whole document, privacy matters: useIXPDF PDF to Text. Local, free, no upload.
  • A few sentences, fast: use your browser's PDF viewer and copy-paste. No tool needed.
  • Complex layout, okay to upload: use Google Docs import. Best conversion quality for tricky layouts, but the file goes to Google.
  • Scanned PDF: none of the above will work. You need OCR — see How to Make a PDF Searchable.

FAQ

Is the IXPDF PDF to Text tool really free?

Yes. It is free, has no account, no signup, no watermark, no usage limit. It runs entirely in your browser — there is no server to charge you.

Will it work on an encrypted PDF?

No. If the PDF is password-protected, the tool shows an "encrypted" error. Decrypt the file first (seeHow to Unlock a PDF), then extract the text.

Why is the extracted text garbled?

Some PDFs have broken font encoding (a missing or wrong ToUnicode mapping). The text renders correctly on screen (the viewer has the font outlines) but cannot be mapped back to Unicode characters for extraction. This is a property of the file, not a bug in the tool. The fix is to re-export from the source application with proper Unicode mapping, or run OCR on the file to add a fresh text layer.

Does the tool preserve the layout of the original PDF?

When you check Preserve layout, the tool inserts line breaks based on the y-position of text items on the page, producing text closer to the visual layout. This is best-effort — complex multi-column layouts, tables, and sidebars may not match the visual reading order. For full-text search and copy-paste, uncheck the option and the tool joins text items with spaces, which is more reliable for search.

Can I extract text from specific pages only?

Yes. Enter a page range like 1,3,5-7 in the Page rangefield. Only those pages will be extracted, in the order listed. Leave the field empty to extract text from every page.

What is the difference between PDF to Text and OCR?

PDF to Text reads the text that is already in the PDF's content stream. It works only on PDFs that have a real text layer (created by a word processor, exported from an app, etc.). OCR (optical character recognition) analyzes the pixels of an image and recognizes letter shapes to create a new text layer. OCR is needed for scanned PDFs, photographs, and any PDF where the text was baked into an image. IXPDF does the former; for the latter, seeHow to Make a PDF Searchable.

Curious how PDF stacks up against other document formats like XPS and EPUB? See PDF vs XPS vs EPUBfor a detailed comparison.

Extract text from your PDF now

Free, local, no upload. Drop your PDF, click run, and get the text in seconds.

Open PDF to Text

Try it now

Ready to put this into practice?

Run the tool locally in your browser — no upload, no account, no watermarks. Your file never leaves your device.