PDF text extractor

This tool reads the text layer stored inside a PDF and rebuilds the lines and the reading order. When a page is a scanned picture with no text, it tells you instead of returning an empty page. Use it to copy text out of a PDF into a document or a message without retyping it.

Loading the tool…

Processing and privacy: Your files are processed inside your browser and are not uploaded to any server.

How to use it

  1. Choose a PDF file.
  2. Set a page range if you need one, and choose text per page or one combined block.
  3. Press “Extract text”.
  4. Read the result and the notices for pages that hold no text.
  5. Copy the text or download it as a .txt file.

Example

A four-page file where page 1 is normal text, page 2 is a scan, page 3 is empty and page 4 is Arabic: page 1 comes back with its lines in reading order and its paragraphs separated, page 2 says “has no text layer: it looks like a scanned image”, page 3 says it looks empty, and page 4 returns the Arabic exactly as it is stored in the file.

Limits and caveats

  • The tool only reads text that is already stored in the file. It does not perform OCR and will not get a single word out of a picture. Pages with no text layer are listed by number, and no text is invented for them.
  • Lines are rebuilt from the position of each text fragment: fragments at a similar height are put on one line and ordered left to right, and a large vertical step starts a new paragraph. Side-by-side columns, tables and footnotes can therefore come out mixed in complex documents.
  • What Arabic looks like depends on the ToUnicode table the producing program wrote, and it often comes out in visual order with ligatures broken. From our own test file arabic-text.pdf we actually get “مستند تجرييب” instead of “مستند تجريبي”, “لالختبار” instead of “للاختبار” (the lam-alef ligature is decomposed in the wrong order), and “.12345” instead of “12345.”. Other files come back perfectly clean. Always read the result before relying on it.
  • Tables lose their column structure: each row becomes one line with spaces between the cells. Fonts, colors and images are not extracted at all.
  • Tested limits: one file up to 100 MB and 500 pages. Password-protected or encrypted files are refused; the tool does not bypass protection.

Questions about this tool

Why did some pages come back empty?

Because they are pictures. Scanner output and phone photos saved as PDF hold pixels, not letters. The tool says so for each page. Turning a picture into text needs OCR software, which this tool does not do and does not claim to do.

Why is some Arabic reversed or broken apart?

A PDF stores glyph shapes, not letters, and getting the letters back depends on the ToUnicode table the producing program wrote. Some programs write it in visual order, or decompose the lam-alef ligature the wrong way round. That is a property of the source file, and no reader tool can repair it reliably.

Is my file uploaded anywhere?

No. The file is read inside your browser with pdf.js, it never leaves your device, and the extracted text is not sent anywhere.

How do I convert a PDF to text?

Choose the PDF, press “Extract text”, then copy the result or download it as a .txt file. This works for PDFs that contain a text layer; scanned pages need OCR software, which this tool does not provide.

Can it extract Arabic text from a PDF?

Yes. It extracts Arabic text exactly as it is stored inside the file, and many files come back perfectly clean. Some programs store the letters in visual order, so words can come out reversed or broken apart; always read the result before relying on it.