PDF to Text

Pull the text of every page out of a PDF into a downloadable .txt file, with optional page markers, using the engine Firefox uses to render PDFs.

🌐 Español

Drop your file here (.pdf)

🔒 Private by design: your files are processed locally in your browser and never uploaded to any server.

Three ways to mark where one page ends

The single option on this page, Page separators, decides how the pages are stitched together, and the three settings produce genuinely different files.

Page markers (--- Page N ---) is the default. Each page’s text is preceded by a line reading three hyphens, the word Page, the number, and three more hyphens, and consecutive pages are separated by a blank line. This is the setting to use when you are citing a source or need to find your way back to page 47 of the original.

Blank line between pages drops the markers and joins the pages with an empty line between them, which reads like a normal document. No separators (one block of text) joins them with a single newline, producing the most compact result and the one best suited to pasting into another tool that just wants the words.

Whichever you pick, each page is tidied first: runs of spaces and tabs collapse to a single space, and leading and trailing whitespace goes. Nothing else is rewritten.

Pulling a quotable text file out of a 40-page report

  1. Drop the PDF onto the box, or use Choose a file. The dropzone only accepts .pdf, and anything else is rejected before processing with a message naming the unsupported file.
  2. Leave Page separators on the default marker setting if you will need to cite page numbers, or switch it to No separators (one block of text) if you just want the prose.
  3. Click PDF to Text. The bar moves to ten percent while the document opens, then holds there for the extraction pass.
  4. Click the Download link that appears, which is named after your PDF with a .txt extension.
  5. Use Process another to clear the box and run a second document.

Fragments, spaces, and the columns that collapse

A PDF does not store sentences. It stores instructions for painting glyphs at coordinates, and the engine hands those back as a list of text items, often one per word and sometimes several per word where kerning or a ligature split it. This tool joins those items with a single space.

That choice has a visible consequence. Joining with nothing at all would fuse adjacent words into one, which is worse, so a space it is, and the price is that a word the PDF happened to emit in two pieces comes out with a space in the middle. Three fragments reading hy, phen and ated arrive as three space-separated tokens.

The same mechanism is what flattens layout. Items are joined in the order the page’s content stream produced them, not in visual reading order, so a two-column article can interleave and a table becomes a run of cell contents with no structure left. What you get is reliably the words on the page. What you do not get is the page.

For a document whose structure actually matters, converting the source rather than the PDF is usually the better move, which is what Convert Word to Markdown does with headings, lists and tables intact.

The all-or-nothing scanned check

Before anything is written, the extracted pages are checked against a simple rule: if the average number of words per page across the whole document is below one, the document is treated as scanned. When that trips, the output file is replaced in its entirety by a short notice explaining that no extractable text was found and pointing at optical character recognition as the fix.

Two things follow from that being an average rather than a per-page test. A five-page PDF with four words on the first page and nothing on the other four averages 0.8, so it trips the check and those four words are discarded along with everything else. Meanwhile a three-page document with a single word on each page averages exactly 1.0 and passes, producing a nearly empty but genuine text file.

Both of those are edge cases you will probably never hit, but they explain the notice if you ever see it on a file you know has words in it.

Two tools that belong either side of this one

If the notice does appear and your PDF really is a scan, run it through OCR PDF first. That tool renders each page, reads the pixels, and writes an invisible text layer back into the PDF at the right coordinates, leaving the visible page untouched. The result is a normal text-bearing PDF that this page can then extract from in the usual way.

On the other side, once you have the text, Word Counter will give you words, characters, sentences, paragraphs and a reading-time estimate from a paste. If all you want is the count and never the text itself, skip this page entirely and use PDF Word Counter, which runs the same extraction and hands back totals plus a per-page breakdown instead of the document’s prose. The rest of the collection is on the PDF tools hub.

See it in action

Screenshot of the PDF to Text tool with sysfenix-sample.pdf (3 KB) loaded, Page separators set to Page markers (--- Page N ---)
PDF to Text mid-process: sysfenix-sample.pdf (3 KB) loaded, Page separators set to Page markers (--- Page N ---).
Screenshot of the PDF to Text result screen showing sysfenix-sample.txt ready to download (1 KB, 63% smaller)
The finished result: sysfenix-sample.txt ready to download (1 KB, 63% smaller). The download link is a local blob URL — the file never leaves your device.

Frequently asked questions

Is there a button to copy the text straight to the clipboard?

There is not. This page uses the site's file shell, which ends with a download link and a button to process another file, so the extracted text arrives as a .txt file rather than in an on-screen box. Open the download in any text editor and copy from there. The paste-in tools on this site behave differently and do offer a copy button, but they take text as input rather than a PDF.

What name does the extracted .txt end up with?

The name of your PDF with its extension swapped for .txt, so a file called quarterly-report.pdf comes back as quarterly-report.txt. A name with several dots keeps everything up to the last one. If the name is somehow empty the fallback is document.txt.

Do blank pages still show up in the output?

In the default page-marker mode, yes. Every page gets its own marker line whether or not anything followed it, which keeps the numbering aligned with the original document. In the other two separator modes a blank page leaves only its share of whitespace, so a gap in the text is the only sign it was there.

Why does the progress bar sit at ten percent for most of the run?

Because this tool reports progress three times rather than once per page, at ten percent when the document has opened, ninety when every page has been read, and a hundred when the file is ready. The long middle stretch is the extraction pass with no updates during it. A large document really is working during that pause even though the bar has not moved.

Can I extract just pages 10 to 20?

Not from this page, which always reads the whole document. Cut the range you want first with the Split PDF tool, which can pull out a page range as a new PDF, then run that smaller file through here. The page markers in the output will restart at one, since the new file genuinely starts at its own first page.

Does any of this alter the PDF I dropped in?

No. The file is read into memory, handed to the PDF engine as a byte array, and the loading task is torn down when extraction finishes. Nothing is written back, and the .txt that appears is a brand new file built from the extracted strings. Your original stays exactly as it was on disk.

Related tools