PDF to Text

Extract text from PDF online: copy or download all the text of a PDF as a .txt file, page by page. Free, private, in-browser.

Files are processed in your browser and never uploaded.

How to extract text from a PDF

  1. Drop a PDF onto the drop zone above, or click to select it.
  2. Click Extract text. The text of every page is read in order and shown in a preview box, with a marker such as --- Page 2 --- at the start of each page.
  3. Copy the text from the preview box, or download it as a plain .txt file (UTF-8).

Extraction is done by pdf.js, the same engine that powers Firefox's built-in PDF viewer, running in your browser tab. The document is not uploaded, so you can safely pull text out of contracts, research papers or statements.

How PDF text extraction works

Inside a PDF, each page has a content stream: a list of drawing instructions such as "use font F1 at 11 points, move to position (72, 700), show these characters". Text is therefore stored as positioned fragments, sometimes a whole line, sometimes a single word or even individual letters.

To turn that back into readable text, the extractor:

  1. decodes each fragment from the font's internal character codes into Unicode, using the mapping tables embedded in the PDF;
  2. sorts the fragments by their position on the page;
  3. inserts spaces and line breaks where the gaps between fragments suggest new words and new lines.

Because the PDF has no explicit notion of paragraphs or reading order, the output is plain text with line breaks rather than formatted paragraphs. For most documents (letters, reports, books, articles) the result reads naturally.

Limitations

SituationWhat you will see
Scanned or photographed pagesNo text – the page is an image, and OCR is not provided
Multi-column layoutsColumns may be interleaved line by line
TablesCell values on lines, without a grid
Fonts without a Unicode mappingGarbled or missing characters
Password-protected / encrypted PDFThe file cannot be opened

A quick test tells you what to expect: open the PDF in any viewer and try to select a sentence. If you can highlight and copy it, the text can be extracted. If the whole page highlights as one block, or nothing highlights, it is an image.

Tips

  • Want to keep headings and paragraphs instead of plain lines? Use PDF to Word in editable mode.
  • For figures arranged in tables, PDF to Excel places values into rows and columns.
  • Plain text is ideal for search indexes, translation tools, word counts, AI summarisers and accessibility software, because it contains no formatting to strip out.
Tip: Hyphenated words split across lines in the original PDF will also be split in the extracted text. A find-and-replace for a hyphen followed by a line break cleans them up quickly in most text editors.

Frequently asked questions

Why do I get a "No text found" message?

The PDF contains images of text rather than real text, which is typical of scans. Text can only be recovered from such files with OCR software.

Why are some characters replaced with strange symbols?

Some PDFs embed fonts with custom character codes and no Unicode mapping. The viewer can draw the shapes, but there is no reliable way to know which letters they represent.

Is formatting such as bold or font size kept?

No. The output is plain UTF-8 text. Each line of the page becomes a line of text, but fonts, colours and images are not kept.

Can I extract text from only certain pages?

The tool extracts the whole document. To limit it, first save the pages you need as a separate file with Split PDF.

Copied to clipboard