How to Convert PDF to Text: Complete Guide (Extract Plain Text from PDF)

7 min read
How to Convert PDF to Text: Complete Guide (Extract Plain Text from PDF)

How to Convert PDF to Text: Complete Guide

Converting a PDF to plain text (.txt) allows you to extract content for editing, analysis, or reuse in other applications. Unlike PDFs, text files are lightweight, universally readable, and easy to process with scripts or word processors. This guide covers every method to convert PDF to text: using online tools (fastest, no installation), Adobe Acrobat Pro, free desktop software (PDF‑XChange, Tesseract OCR), and command line tools (pdftotext). You will learn how to extract text from both native PDFs (selectable text) and scanned PDFs (using OCR), preserve formatting (or not), handle multiple pages, and batch convert many files. By the end, you will be able to extract clean text from any PDF.


Why Convert PDF to Text?

  • Copy content for reuse: Extract quotes, data, or entire chapters for use in Word, blogs, or databases.
  • Reduce file size: Text files are tiny compared to PDFs.
  • Improve searchability: Some systems index .txt files better than PDFs.
  • Process with scripts: Use Python, grep, or other tools on plain text data.
  • Accessibility: Screen readers sometimes handle plain text more reliably.
  • Edit without formatting constraints: Text files have no layout – just characters.

Types of PDF to Text Conversion

Method Description Best For Preserves Layout
Direct text extraction Reads text from selectable PDFs (digital PDFs). Fast and accurate. No image processing. Native PDFs (from Word, Excel, etc.) Basic (paragraphs, spaces)
OCR‑based extraction Scanned PDFs (images) require OCR to recognize text. Slower but necessary for image‑based documents. Scanned books, contracts, handwritten notes Poor (line‑by‑line only)
Layout‑preserving text Attempts to keep columns, tables, and positioning via spaces and line breaks. Tables, multi‑column articles Medium (spaces & tabs)

Method 1: Convert PDF to Text Online (Fastest, No Installation)

Online PDF‑to‑text converters are ideal for quick, non‑sensitive documents. Do not upload confidential files.

Using Our PDF to Text Tool:

  1. Go to PDF to Text.
  2. Upload your PDF.
  3. Click Convert – the tool extracts all text from the PDF.
  4. Copy the text from the result box or download as .txt file.
  5. Your file is processed in your browser and never uploaded to our servers.

Our tool works best on native (selectable) PDFs. For scanned PDFs, use our OCR PDF tool first.

Alternative Free Online PDF to Text Converters:

  • SmallPDF PDF to Text: Free daily limit, basic extraction.
  • Sejda Extract Text: 50 MB limit, 200 pages, preserves line breaks.
  • PDF2Go PDF to Text: 100 MB limit, simple interface.
  • OnlineOCR.net: Free with CAPTCHA, supports both native and scanned PDFs.

Privacy warning: Never upload legal, medical, or financial PDFs to online text extractors. Use offline tools.


Method 2: Convert PDF to Text Using Adobe Acrobat Pro

Adobe Acrobat Pro provides professional text extraction with options for layout preservation.

Export to Text (Native PDFs):

  1. Open the PDF in Adobe Acrobat Pro.
  2. Go to File > Export To > Text > Text (Plain) or Text (Accessible).
  3. Choose Plain for simple, unformatted text. Choose Accessible for better reading order.
  4. Save the .txt file.

Using “Save As Text” (Older versions):

  1. File > Save As Other > Text.

For Scanned PDFs in Acrobat Pro:

  1. First run OCR (Tools > Scan & OCR > Recognize Text).
  2. Then export as text using the steps above.

Method 3: Convert PDF to Text Using Free Desktop Software (Offline, Private)

These tools work offline, keeping your PDFs private.

PDF‑XChange Editor (Free version, Windows):

  1. Open the PDF in PDF‑XChange Editor.
  2. Select all text (Ctrl+A) or the desired area.
  3. Copy (Ctrl+C) and paste into Notepad or any text editor.
  4. Save as .txt. This method is simple but may lose some formatting.
  5. Alternatively, go to File > Export > Export to Text (free version may watermark).

LibreOffice Draw (Free, Windows/Mac/Linux):

  1. Open the PDF in LibreOffice Draw.
  2. Select text boxes (or Edit > Select All).
  3. Copy and paste into a text document (Writer) or directly save as .txt.
  4. For batch conversion, use the command line: libreoffice --headless --convert-to txt *.pdf.

Foxit Reader (Free, Windows/Mac):

  1. Open PDF, go to File > Export > To Text.
  2. Choose output options (page range, layout preservation).
  3. Save as .txt.

poppler-utils (pdftotext) – Linux, Windows, Mac (Command Line):

  1. Install poppler-utils (on Linux: sudo apt install poppler-utils; on Windows: download from poppler project; on Mac: brew install poppler).
  2. Run: pdftotext input.pdf output.txt
  3. Options:
    • -layout – preserve layout (spaces, line breaks).
    • -table – treat as table (better for tabular data).
    • -nopgbrk – do not insert page breaks.
  4. Batch convert all PDFs: for file in *.pdf; do pdftotext "$file" "${file%.pdf}.txt"; done

Converting Scanned PDFs to Text (Using OCR)

Scanned PDFs contain images of text, not selectable characters. You must run OCR first.

  1. Use our OCR PDF tool to create a searchable PDF or output text directly.
  2. Select output as “Plain text (.txt)” when using our OCR tool.
  3. After OCR, you will have a text file with recognized characters.
  4. For offline OCR: Use Tesseract OCR with gImageReader (free GUI) to convert scanned PDFs to text without uploading.

Comparison Table: PDF to Text Conversion Methods

Method Price Native PDFs Scanned PDFs (OCR) Layout Preservation Batch Convert Privacy
Online (DonePDF /pdf-to-text) Free ✅ Yes ⚠️ (use OCR tool first) Basic ❌ No Files uploaded
Adobe Acrobat Pro ~$15/month ✅ Yes ✅ Yes (OCR built‑in) Good (accessible text) ❌ No Local/cloud
pdftotext (poppler) Free ✅ Yes ❌ No (no OCR) ✅ Yes (-layout flag) ✅ Yes (script) Local
PDF‑XChange Editor (free) Free (watermark) ✅ Yes ⚠️ (OCR optional extra) Medium ❌ No Local
LibreOffice Draw Free ✅ Yes ❌ No Basic ✅ Yes (command line) Local

Step‑by‑Step Workflow: Extract Text from a Multi‑Page PDF for Analysis

  1. Determine if the PDF is native (selectable) or scanned. Try to select text in a PDF reader. If you cannot, it is scanned.
  2. If scanned: Run OCR using our OCR PDF tool (output as text or searchable PDF).
  3. If native: Use PDF to Text online or pdftotext offline.
  4. After obtaining the .txt file, open it in any text editor (Notepad, VS Code, etc.).
  5. Inspect for errors: OCR may misread some characters (e.g., “rn” as “m”). Correct manually if needed.
  6. Optionally, use text processing (Python, grep, or Word) to clean or analyze the content.

Best Practices for PDF to Text Conversion

  • For clean, structured text, use pdftotext with -layout to preserve columns and spacing.
  • For maximum accuracy on scanned PDFs, use 300 DPI source scans and select the correct language in OCR.
  • Remove headers/footers and page numbers after extraction using a text editor’s find/replace.
  • For tables, consider exporting to Excel or CSV instead of plain text – use Convert PDF to Excel.
  • If the extracted text is garbled, the PDF may be encrypted or contain non‑standard fonts. Try unlocking first with Unlock PDF.

Common Mistakes When Converting PDF to Text

  • Using an online tool for confidential PDFs – sensitive content may be exposed.
  • Not checking the output for OCR errors – especially numbers or special characters.
  • Assuming text order matches visual order – in multi‑column layouts, the text extraction may read left to right across columns incorrectly. Use layout preservation option.
  • Converting a scanned PDF without OCR – you will get empty or garbage output.
  • Over‑relying on layout – text files are not designed for complex tables; use other formats.

Tools for PDF Management – DonePDF Utilities



Introduction & Basics

PDF Conversion

OCR & Scanned Documents

Editing & Annotation

Security & Signatures

Use Cases


Conclusion – Extract Any Text from PDFs with Confidence

Converting PDF to plain text is a simple but powerful way to reuse content. For native (selectable) PDFs, our free PDF to Text tool provides instant extraction without installation. For scanned documents, run OCR first using OCR PDF then export to text. Offline users will appreciate the flexibility of pdftotext (with layout preservation) or LibreOffice. Always consider data privacy – use offline tools for sensitive files. Whether you need a quick quote, full book text, or data for analysis, this guide gives you all the methods to get plain text from any PDF.

Frequently Asked Questions

How can I convert a PDF to text for free?

You can convert PDF to text for free using these methods:

  1. Online (fastest): Use our PDF to Text tool – upload your PDF, click Convert, copy or download the text. No registration, auto‑deletion.
  2. Offline (Windows, Mac, Linux): Use pdftotext (poppler-utils) via command line: pdftotext input.pdf output.txt. Free and private.
  3. Adobe Acrobat Reader (free): Open PDF, select text, copy (Ctrl+C), and paste into Notepad. Works for short documents.
  4. LibreOffice Draw: Open PDF, select all text, copy, paste into Writer, save as .txt.

For scanned PDFs (images), first use OCR PDF to convert to text.

How do I extract text from a scanned PDF (image PDF)?

Scanned PDFs contain images of text. To extract text, you need OCR (Optical Character Recognition):

  1. Online OCR: Use our OCR PDF tool. Upload the scanned PDF, choose output as “Plain text (.txt)”, select the document language, and click Convert. Download the text file.
  2. Offline OCR (free): Install gImageReader (GUI for Tesseract). Add your scanned PDF, run OCR, and export to text. Completely private.
  3. Adobe Acrobat Pro: Run Tools > Scan & OCR > Recognize Text, then File > Export To > Text.

OCR accuracy depends on scan quality (300 DPI recommended) and language selection. Proofread the output.

How do I preserve the layout (columns, spacing) when converting PDF to text?

Plain text does not support columns or complex layouts, but you can simulate layout using spaces and line breaks:

  • Using pdftotext (offline): Add the -layout flag: pdftotext -layout input.pdf output.txt. This preserves horizontal spacing and line breaks, keeping columns relatively aligned.
  • Using Adobe Acrobat Pro: Export to “Text (Accessible)” – it tries to maintain reading order but not visual layout.
  • Using online tools: Most online converters do not preserve layout well. For complex documents, consider converting to Word (PDF to Word) instead of plain text.

If you need exact layout, PDF is the better format. For data extraction, consider converting to Excel or CSV.

Why does my PDF to text output have garbled or missing characters?

Garbled text usually indicates one of these issues:

  1. Scanned PDF without OCR – you need to use an OCR tool first. Direct extraction from an image PDF produces nonsense.
  2. Non‑standard or encrypted fonts – some PDFs use custom fonts that do not map to Unicode. Try unlocking the PDF with Unlock PDF first.
  3. Wrong character encoding – if the PDF contains special characters (e.g., Cyrillic, Arabic), make sure the converter supports that language. Our PDF to Text tool handles many languages.
  4. Corrupted PDF – try opening the PDF in a different reader; if it is corrupted, fix it with a repair tool.

For multilingual documents, use OCR with the correct language selected.

How do I batch convert multiple PDFs to text at once?

To convert many PDF files to text in one go, use these methods:

  • pdftotext command line (Windows, Mac, Linux): Navigate to the folder with PDFs and run: for %f in (*.pdf) do pdftotext "%f" (Windows) or for f in *.pdf; do pdftotext "$f"; done (Mac/Linux). This converts every PDF to a .txt file with the same base name.
  • LibreOffice command line: libreoffice --headless --convert-to txt *.pdf – converts all PDFs in the folder to text.
  • Online batch tools: Most free online tools do not support batch conversion. Use offline solutions for large batches.
  • Adobe Acrobat Pro (with Action Wizard): Create an action that exports all open PDFs to text – requires paid version.
How do I convert a PDF to text on my phone (Android/iPhone)?

You can extract text from PDFs on mobile using these free apps:

  • Adobe Acrobat Reader (free): Open PDF, tap the selection tool or “Select Text”, choose the text, copy, then paste into a notes app. For scanned PDFs, Acrobat Reader can perform OCR (premium feature for full export).
  • Google Drive + Docs: Upload PDF to Google Drive, open with Google Docs – it will run OCR automatically on scanned PDFs. Then select all and copy to a text file.
  • Our online tool via mobile browser: PDF to Text works on any smartphone – upload, convert, copy the text. Requires internet.
  • OCR apps (mobile): “Text Scanner” (Android) or “FineScanner” (iOS) – capture PDF pages and extract text via OCR.

For long PDFs, using a desktop computer is more efficient.

What is the difference between converting PDF to text and using OCR?

PDF to text conversion (without OCR) extracts text that is already selectable in the PDF. This works only for “native” PDFs (created from Word, Excel, or digital sources). The text is read directly from the document structure; it is fast and accurate but cannot recover text from images.

OCR (Optical Character Recognition) is a process that analyzes images of text (like scanned pages or photos) and attempts to recognize characters. OCR is slower, may have errors (e.g., “rn” instead of “m”), and is necessary for scanned PDFs. After OCR, you get a text layer that can then be exported as a .txt file.

Use PDF to text for digital PDFs. Use OCR for scanned documents or image‑only PDFs. Our OCR PDF tool handles both: it will detect if a PDF already has selectable text and skip OCR if not needed.

How do I extract text from a specific page range of a PDF?

To extract text only from certain pages, use one of these methods:

  • pdftotext (command line): Add the -f (first page) and -l (last page) flags. Example: pdftotext -f 3 -l 5 input.pdf output.txt extracts pages 3 to 5 only.
  • Adobe Acrobat Pro: When exporting to text, click Settings > Page range and enter the desired pages.
  • Online tools (including our PDF to Text): Most do not support page‑range extraction. As a workaround, use Split PDF to extract the page range as a new PDF, then convert that PDF to text.
  • PDF‑XChange Editor: Select and copy text from specific pages manually, or use the Export to Text dialog with page range options (paid).
How do I convert a PDF to text without losing line breaks?

If you want to keep the original line breaks (e.g., for poetry or code listings), you need a tool that preserves line endings:

  • pdftotext with -layout flag: pdftotext -layout input.pdf output.txt – this keeps line breaks and spaces as close as possible to the original.
  • Adobe Acrobat Pro: Export to “Text (Plain)” usually preserves line breaks but may add extra spaces.
  • Online tools: Our PDF to Text preserves basic line breaks (each line ends with a newline). For precise fidelity, use pdftotext.

Note: If the PDF is scanned, you cannot preserve original line breaks because OCR reconstructs text without knowing the original line structure. Use OCR with careful post‑processing.

Can I convert a password‑protected PDF to text?

Password‑protected PDFs may have restrictions that prevent text extraction. Here is what to do:

  • If you know the password: Open the PDF with the password, then use Unlock PDF to remove protection (enter the password, download an unlocked copy). Then convert the unlocked PDF to text normally.
  • If the PDF has an “owner” password (restricts printing/editing) but no “user” password (you can open it): Our Unlock PDF tool can remove those restrictions without needing the password (upload the file – it removes editing/printing limits). Then convert to text.
  • If you cannot open the PDF at all (user password required) and you do not have it: It is illegal to bypass. For your own files, you may use password recovery tools, but standard converters cannot extract text.