PDF10 min readUpdated 2026-09-23

How to Convert PDF to Text (5 Free Ways That Actually Work)

Tools mentioned in this guide

Converting a PDF to text takes about ten seconds, or it cannot be done at all. Which one you get depends on something the PDF does not show you: whether it has a text layer.

A PDF made by a word processor, a website or an invoicing system stores the actual characters, so any tool can read them straight out. A PDF made by a scanner or a phone camera stores a picture of a page. It looks exactly the same on screen, and it contains no text whatsoever. We confirmed how stark the difference is: our scanned test invoice returned 0 characters from a standard extractor, and the same page as a digital PDF returned all of them.

This guide covers five free ways to get plain text out of a PDF, which one to use for which kind of file, and the four things that scramble the output even when extraction "works". Every claim below comes from running six test PDFs through the tools, not from a spec sheet.

First, check whether your PDF has a text layer

Open the PDF in any viewer and try to highlight a single word with your cursor.

  • The word highlights on its own: the PDF has a text layer. Use Method 1, 2 or 4. They are fast and copy the characters exactly.
  • Nothing highlights, or a whole-page box appears: the page is an image. Only OCR (Method 3) or Google Docs (Method 5) can read it.

This matters because a text extractor pointed at a scan does not fail loudly. When we ran our scanned invoice through an extractor that reads the text layer, it returned an empty page with a success message. If your "converted" text file is blank, you have a scan, not a broken tool.

Method 1: Copy and paste (any PDF with a text layer)

For a short document you only need once, the tools you already have are enough.

  1. Open the PDF in your browser, Adobe Acrobat Reader, or Preview on a Mac.
  2. Press Ctrl+A (+A on Mac) to select all the text on the page or document, then Ctrl+C to copy.
  3. Open a plain-text editor: Notepad on Windows, or TextEdit on Mac after choosing Format → Make Plain Text.
  4. Paste, then save the file with a .txt extension, using UTF-8 encoding if you are asked.

Pasting into a plain-text editor first matters. Paste straight into Word or Google Docs and you carry the PDF's fonts and odd spacing with you. A plain-text editor strips all of that, so you see exactly what came out.

The catch is that copy-paste gives you whatever order the PDF stores the text in, which is not always the order you read it. That is covered in what goes wrong below.

Method 2: Extract the text layer in your browser

For long documents, or when you want a file rather than a clipboard, the FileNaut PDF to Markdown converter pulls the whole text layer out at once. It runs entirely in your browser, so the PDF is never uploaded. Markdown is plain text with a few symbols added, so the result opens in any text editor.

  1. Open PDF to Markdown and drop in your PDF.
  2. Click Extract Text. The text appears in the right-hand panel almost instantly.
  3. Click Download .md, then rename the file from .md to .txt, or copy the text straight from the panel.
  4. Delete the ## Page 1 headers and --- dividers the tool adds between pages if you do not want them.

What it does well: the characters are copied exactly, with no recognition errors, and simple tables came out one row per line (Apples 12 $4.50) in our test.

One limitation you should know about. In our testing, lines set very close together, such as 10-point text at single spacing, were joined with no space between them: "ten points." followed by "Tight line two" came out as points.Tight line two. Lines with normal or generous spacing were fine. If you see words glued together at line ends, run the same file through Method 3 instead, which reads the page visually and got those lines right.

Method 3: OCR for scanned PDFs (and any PDF that comes out garbled)

OCR (optical character recognition) reads the text off a picture of the page, the same way you do. It is the only way to get text from a scanned PDF, and it is also a good fallback when a digital PDF's text layer is damaged. Our guide to OCR explains how it works.

  1. Open FileNaut PDF OCR and drop in your PDF.
  2. Click Extract Text. Each page is rendered and read in your browser, and the progress bar counts through the pages.
  3. Click Copy and paste into a plain-text editor, then save as .txt. There is also a Word button if you want a document instead.

How well it did in our tests:

  • The scanned invoice came back word-perfect, including the figure $1,284.50, where the text-layer extractor returned nothing.
  • A 10-page, 300-line document was read with all 300 lines exactly right, in about 11 seconds on a laptop, so roughly one second per page.
  • It correctly separated the tightly spaced lines that Method 2 joined together.

OCR accuracy depends on the scan. Clean, straight, 300 DPI pages of printed text read almost perfectly. Handwriting, faint photocopies, skewed phone photos and decorative fonts will produce errors, so proofread anything that matters, especially numbers.

For a single image rather than a PDF, such as a screenshot, use Image OCR.

Method 4: Command line and Python (for batches)

If you have hundreds of PDFs, do it with a script. Two standard options:

pdftotext is part of the free Poppler toolkit (brew install poppler on Mac, sudo apt install poppler-utils on Debian or Ubuntu):

pdftotext input.pdf output.txt
pdftotext -layout input.pdf output.txt

The -layout option keeps text in its physical position, so columns and tables stay side by side instead of being read into one stream.

Python with pypdf (pip install pypdf). We ran this exact script on our 10-page test file and got all 10 pages, 320 lines, into output.txt:

from pypdf import PdfReader

reader = PdfReader("input.pdf")
with open("output.txt", "w", encoding="utf-8") as f:
    for page in reader.pages:
        f.write((page.extract_text() or "") + "\n")

pypdf has a layout mode as well: page.extract_text(extraction_mode="layout"). On our test table it produced properly aligned columns (Item … Qty … Price) where the default mode put every cell on its own line.

Neither tool does OCR. On a scanned PDF, both give you an empty file.

Method 5: Microsoft Word or Google Docs

If you already live in Word or Google Docs, both can open a PDF and save it as plain text.

  • Word (Windows or Mac): use File → Open and choose the PDF. Word converts it into an editable document, then File → Save As and choose Plain Text (.txt). The conversion is aimed at keeping the layout, so expect some odd line breaks.
  • Google Docs: upload the PDF to Google Drive, right-click it and choose Open with → Google Docs. Google runs OCR as part of the conversion, so this also works on many scans. Then use File → Download → Plain text (.txt).

Both routes upload your file to a cloud service or run a full office suite. For a confidential document, Methods 2 and 3 keep everything on your own machine. If what you actually need is an editable document rather than raw text, PDF to Word and our PDF to Word guide are the better fit.

What goes wrong (and what to do about it)

A successful conversion can still give you text in the wrong order or with pieces joined together. We built one test PDF for each problem and ran it through the tools. Here is what happened:

ProblemWhat we measuredWhat to do
Scanned page0 characters from text-layer extraction; word-perfect from OCRUse PDF OCR
Two columns, stored row by rowEvery method, OCR included, read straight across: left line 1, right line 1, left line 2…Crop to one column at a time, or use a layout mode and cut the columns apart
Two columns, stored column by columnRead correctly: the whole left column, then the whole rightNothing. How the PDF was made decides this, not your tool
TablesDefault pypdf put each cell on its own line; the browser extractor and OCR kept one row per lineUse layout mode, or get the data as a CSV from the source
Tightly spaced linesOne extractor joined 10pt single-spaced lines with no space; OCR did notScan the output for glued words at line ends; switch to OCR if you find them
Hyphenated line breaks"hyphen-" and "ated" came out as hyphen- / ated or hyphen-ated, never repairedFind-and-replace - followed by a line break

The pattern: a text extractor reports what the file stores, in the order it stores it. A PDF records where each piece of text goes on the page. It does not record which piece a person should read next. When the storage order and the reading order match, the output is clean. When they do not, no text-layer tool can know.

Tips for cleaner text

  • Spot-check the end of every page. Problems gather at page breaks: headers, footers and page numbers get mixed into the text.
  • Search the output for a phrase you can see in the PDF. If it is missing, you have either a scan or a font that does not map to real characters. Switch to OCR.
  • Save as UTF-8. Otherwise accented letters, curly quotes and symbols can turn into question marks.
  • Compare two methods when accuracy matters. Paste the two outputs into Text Compare and every disagreement is highlighted. That is usually where one method went wrong.
  • Check the length. The Word Counter tells you straight away if the output is far shorter than the document looks.
  • Want headings and lists as well? Plain text drops all structure. Our PDF to Markdown guide covers keeping it.

Frequently asked questions

Why can't I copy text from my PDF?
There are three usual causes. Most often, the PDF is a scan, so there is no text to copy, only an image. PDF OCR solves that. Second, the author may have set a permission that tells viewers to block copying. Third, the fonts may not map to real characters, so what you paste is gibberish; OCR gets around that too, because it reads the page visually.
Does a "no copying" permission actually stop text extraction?
Usually not. We made a test PDF that opens without a password but forbids copying, and both extractors we tried returned the complete text. The permission is an instruction that well-behaved viewers follow, not a lock on the content. Anything genuinely confidential needs a real open password, not a copy restriction. If the document belongs to someone else, the restriction tells you their wishes, and they still own the content.
How do I convert a scanned PDF to text?
You need OCR. Drop the file into PDF OCR, click Extract Text, then copy the result into a text file. Our scanned test invoice came back word-perfect. Clean, straight scans at 300 DPI give the best results; always proofread numbers.
Why does my converted text have the columns mixed together?
Because the PDF stores its text line by line across the whole page rather than one column at a time. Every method we tested, OCR included, followed that order and interleaved the columns. The reliable fix is to crop the page to one column (see how to crop a PDF) and convert each column separately.
Is it safe to convert a confidential PDF online?
It depends on where the processing happens. Many online converters upload your file to their server. FileNaut's PDF to Markdown and PDF OCR run in your browser, so the PDF itself stays on your device. The OCR tool downloads its recognition engine from a public code server, but your document is never sent anywhere.
What is the difference between PDF to text and PDF to Word?
A .txt file holds only characters. It has no fonts, images, tables or layout, which is what you want for searching, pasting into another system, or feeding a script. A Word document tries to rebuild how the page looked. If you plan to edit the document and keep its appearance, use PDF to Word.
Why are there strange characters or question marks in my text?
Either the file was saved in an encoding that cannot hold those characters, in which case you should re-save as UTF-8, or the PDF's font does not map its shapes to real letters. If re-saving does not fix it, the font is the problem, and OCR is the way around it.
How long does OCR take?
In our test, about one second per page: a 10-page document took roughly 11 seconds on a laptop. Older phones and very large pages will be slower. Text-layer extraction is close to instant, which is why it is the better choice whenever the PDF has a text layer.

The short version

Try to highlight a word first. If it highlights, the PDF has a text layer: copy and paste into a plain-text editor, or pull the whole file out with PDF to Markdown and save it as .txt. If nothing highlights, it is a scan, and PDF OCR is the tool.

Then check the output before you trust it. Columns stored row by row, tightly spaced lines and hyphenated line breaks are where every method goes wrong, and none of them fail with an error.

Ready to try it?

Use the tool right now — free, no signup, no upload.