Skip to content

Extract Text from a PDF

Open a PDF and its text shows up ready to copy, with line breaks and paragraphs in place, page by page. Use it to quote a letter, move a table into an email or edit a document you only have as a PDF. If the PDF is scanned, it tells you plainly: there is no text to pull out without OCR. It all happens in your browser: the file is not uploaded to any server.

Works anywhere in the world, wherever you are.

Mark where each page starts

The text shows up here as soon as the file opens.

Choose a PDF

—

The text shows up here as soon as the file opens.

The PDF never leaves your device: the text is read in your browser, not uploaded anywhere, not in the Share link and not saved. Close or reload the page and it is gone. Up to 100 MB and 2,000 pages.

About this calculator

How to use it

Press "Choose a PDF" or drop the file on the box. The text is read as soon as the file opens, with a progress bar on long documents that you can stop at any time.

In "Pages" type which ones you want, with numbers and ranges separated by commas: "2-4, 7" shows pages 2 to 4 and page 7. Leave it blank for all of them. "Mark where each page starts" puts a line such as "=== Page 3 ===" before each one, so you know where each piece comes from.

"Copy result" puts the text on your clipboard and "Download .txt" saves it as a text file named after the PDF. The summary shows how many words, characters and lines your selection has.

How the lines are put back together

A PDF does not store lines or paragraphs: it stores pieces of text with the exact spot where each is drawn. The tool puts them in order and decides: a piece that starts lower than the last one begins a new line; a big jump, about twice the height of the letters, leaves a blank line, as between paragraphs; and a visible gap between two pieces on the same line becomes a space.

That way a letter, a contract or a report comes out much as it reads. Tables come out row by row, with each row's cells separated by spaces. A two-column document usually comes out column by column, with a blank line between them, because that is how the PDF stores it.

Example

A 3-page notice: the first page says "Notice of meeting" and, on the next line, "Saturday, November 14, 10:00 a.m."; the second is a signed sheet someone scanned; the third says "Thank you for coming".

With page markers on, the result starts with "=== Page 1 ===", then the first page's two lines as they are, then "=== Page 2 ===" with nothing under it, and ends with "=== Page 3 ===" and "Thank you for coming". The summary says 2 of 3 pages have text, and a note explains that page 2 is an image and reading it would need OCR.

Scanned PDFs need OCR

If a PDF came from a scanner or a photo, its pages are images: you see letters, but to the computer they are coloured dots. This tool reads the text stored inside the PDF and does not do OCR (optical character recognition), which is what turns an image into letters. When no page has text, it says so plainly instead of handing you an empty result with no explanation; if only some pages are images, it tells you which.

Many scanners and apps already run OCR when they save the PDF. If yours did, the text is there and this tool pulls it out.

Your PDF stays with you

The file is opened with pdf.js, Mozilla's PDF reader, inside your browser. Nothing is uploaded to a server, neither the text nor the file name is in the "Share" link, and nothing is saved; the site's statistics only count that the tool was used. Close or reload the page and it is all gone. That matters when the PDF is a bank statement, a medical record or a contract.

If the PDF has a password to open it, the tool asks for it and it only works if you know it: it does not guess passwords or remove protection. If whoever made the PDF marked its text as not to be copied, the tool warns you; use it only if you have the right to.

Important limitations

  • No OCR: a scanned PDF, or one made of photos, gives no text.
  • Formatting is not kept: bold, sizes, colours, pictures and the exact position on the page are lost; you get plain text with its lines.
  • In tables, columns or documents with a complex layout, the text comes out in the order the PDF stores it, which is not always reading order.
  • Some PDFs store letters with their own codes and their text comes out as gibberish; the same happens when copying from any other reader.
  • Up to 100 MB per file and the first 2,000 pages. The screen shows the first 200,000 characters; copy and download take the full text.

Frequently asked questions

No. The text is read in your browser. The file is not sent or stored, and neither the text nor the file name goes in the Share link or the statistics.

Because it is scanned or made of photos: its pages are images and carry no text inside. Getting it out needs OCR, which this tool does not do; it tells you when that happens and which pages are images.

Yes. In Pages type numbers and ranges separated by commas, like "2-4, 7". Leave it blank for all of them.

Yes. Lines are rebuilt from where each piece of text sits on the page, and a big gap, as between paragraphs, leaves a blank line.

Yes, if you know it: the tool asks for it and it is used only in your browser to open the file. It does not guess or remove passwords.

This calculation runs in your browser and is never sent to a server. Your last values may be saved on your device only, for convenience. Results are estimates and are not financial, tax, accounting or legal advice.