Utilia

PDF to Text

Extract the text of a PDF in your browser, page by page, with line breaks and page separators. Copy it or download it as a .txt file.

Leave empty for every page, or type pages and ranges such as 1-3, 5, 8-.

Untick to join the lines of each paragraph and rejoin words hyphenated at the end of a line.

How to extract text from a PDF

  1. Drop a PDF file on the drop zone, or click it to choose one. The tool shows its name, number of pages and size.
  2. Optionally, type the Pages (optional) to read, such as 1-3, 5 or 8-. Leave the field empty to extract every page.
  3. Choose the Reading order: As stored in the file (best for columns) or Top to bottom, left to right.
  4. Tick or untick Add page separators and Keep line breaks.
  5. Click Extract text. Long documents show their progress page by page; Stop ends early and keeps the pages already read.
  6. Check the counts of pages, words, characters and lines, then click Copy or Download .txt.

The two checkboxes can be changed after the extraction: the text is reformatted instantly, without reading the file again.

Text layer or scanned page?

A PDF created by a word processor, a spreadsheet or a “Save as PDF” command contains a text layer: the real characters, with their font and position. This tool reads that layer with PDF.js, so the result is exact, with accents, ligatures and symbols intact.

A scanned PDF is different: each page is only a photo of paper, and there is no text to read. When a selected page has no text but contains an image, the tool says so and names the pages concerned. OCR (optical character recognition) is not included: the text of scanned pages can’t be extracted here. Pages with neither text nor images are reported as blank.

Reading order and layout

A PDF stores pieces of text with coordinates, not paragraphs. The tool rebuilds lines from pieces that share a baseline, adds a space where there is a visible gap, and leaves an empty line where the vertical gap is large, which usually separates paragraphs.

  • As stored in the file (best for columns) follows the order the producing software wrote the text in. For most documents, including two-column articles, this is the natural reading order.
  • Top to bottom, left to right sorts by position on the page. Try it when the first option gives scrambled text; note that it reads straight across columns.

With Add page separators, each page starts with a line such as --- Page 3 ---, handy for citing or checking a passage.

Joining lines into paragraphs

With Keep line breaks ticked, every line of the PDF stays a line of text. Untick it to join the lines of each paragraph into one, which is better for pasting into a document or a translator. A word cut by a hyphen at the end of a line, such as “exam-” + “ple”, is rejoined when the next line starts with a lowercase letter. The limit: a compound word that happens to break at its own hyphen (“well-” + “known”) loses that hyphen, so proofread important passages.

Privacy

The PDF is read by your browser, on your device. Neither the file nor the extracted text is sent to a server.

Frequently asked questions

Why is the extracted text empty?

The pages are probably scanned images with no text layer. The tool tells you which pages look scanned. It doesn’t do OCR, so you need a text-recognition program for those pages.

Can I extract text from a password-protected PDF?

Not while it’s locked. Files that only restrict copying or printing open normally; files that ask for a password to open must be unlocked first, with the password.

Why are some words stuck together or split?

Some PDFs position each letter or word separately with unusual spacing. The tool guesses spaces from the gaps between pieces of text; try the other Reading order if lines are mixed up.

Is the formatting kept?

No. The result is plain text: bold, fonts, colours, tables and images are not kept, only the words, line breaks and paragraphs.

How do I get the text of a single page?

Type its number in Pages (optional), for example 4, then click Extract text.