By Updated

PDF to Text

Extract every word from a PDF as plain text or structured JSON. 100% browser-side using pdfjs-dist. No upload, no signup.

Interactive tool

Drop a PDF to extract text

Plain text or per-page JSON. Files never leave your browser.

What is the PDF to Text tool?

A pure-browser text extractor for PDFs. Drop a file and the tool walks every page with pdfjs-dist, pulls out the embedded text content, and shows it in two formats: plain text (concatenated, optionally with page markers) and structured JSON (one entry per page with its own word and character counts). Search inside the result, copy to clipboard, or download as .txt or .json.

How to Extract Text from a PDF

  1. 1Drop a PDF file into the upload area
  2. 2Wait a moment for pdfjs-dist to walk every page
  3. 3Pick Plain text or Per-page JSON output
  4. 4Optionally normalize whitespace or hide page markers
  5. 5Use the search box to highlight matches inside the extracted text
  6. 6Copy or download the result as .txt or .json
What you get

Key features

Two output formats

Plain text or structured per-page JSON for downstream tooling

Page-aware extraction

Each page is processed independently so the JSON output stays usable for ML, search indexing, and analysis

Whitespace normalization

Toggle between PDF-faithful line breaks and a one-paragraph-per-page summary

Built-in search

Find every occurrence of a query in the extracted text with live highlighting

Word and character counts

Per-page and total stats are computed during extraction

Scanned-PDF detection

When no embedded text is found, the tool nudges you toward the OCR tool

Encrypted-PDF guard

Password-protected files are detected and reported with a friendly error

No upload

pdfjs-dist runs in your browser; the PDF never leaves your device

Why extract PDF text in the browser?

Most online "PDF to Text" tools upload your file and parse it server-side. Because pdfjs-dist (the engine behind Firefox's PDF viewer) is happy to run client-side, there is no real reason to send sensitive content over the wire. This tool extracts text in your browser, hands you both human-readable and machine-readable formats, and never touches the network.

Common use cases

  • Pulling quotes out of a research paper for citation
  • Building a quick search index from a folder of PDF reports
  • Migrating content from a PDF export back into Markdown
  • Feeding extracted text into an LLM analysis pipeline
  • Counting words across a long-form document for editing
  • Converting an export to plain text for accessibility tooling

Plain vs JSON output

  • Plain text: pages concatenated with optional "--- Page N ---" markers; ready for clipboard or downstream transforms
  • Per-page JSON: { pageCount, totalWords, totalCharacters, pages, [{ pageNumber, text, words }] }; ideal for indexing, ML preprocessing, or further parsing

Limitations

  • Scanned PDFs (image-only pages) yield no text: use the PDF OCR tool
  • Password-protected PDFs are blocked; remove the password first
  • Column layouts may interleave columns line-by-line; use the normalize-whitespace mode to flatten
  • Pages with custom CIDFonts may produce mojibake until pdfjs maps the glyphs back to Unicode
Pro tips

Tips & best practices

Use Normalize for clean copy-paste

When you only need the words and not the layout, normalize whitespace produces one paragraph per page.

Use the JSON output for pipelines

Per-page word counts and indexes make the JSON ideal for chunking before passing to an LLM or full-text search engine.

Search inside before copying

The built-in search shows match counts so you can confirm a passage is in the document before copying everything.

Combine with PDF Extract

Need just chapter 3 as plain text? Use PDF Extract first to grab those pages, then run them through this tool.

Keep page markers when sharing

The "--- Page N ---" separators help reviewers cross-reference the original: keep them on for shared exports.

Built for trust

Privacy & security

pdfjs-dist runs entirely in your browser. The PDF, the extracted text, and the search query never leave the device. Closing the tab discards the file and the result.

Frequently Asked Questions

Why is my output empty?

The PDF most likely contains scanned page images instead of embedded text. Try the PDF OCR tool, which uses Tesseract.js to recognise text from images. The tool will warn you when it detects a scan.

Does this work on password-protected PDFs?

No. Encrypted PDFs are blocked. Use the PDF Password Remover first, or open the file in a viewer and re-save it without protection.

What is the difference between Plain text and Per-page JSON?

Plain text concatenates the pages into one block (with optional "--- Page N ---" markers). Per-page JSON returns a structured object: { pageCount, totalWords, totalCharacters, pages, [...] }: designed for downstream indexing, ML, or search pipelines.

Why does my multi-column layout look weird?

pdfjs-dist reports text in document order, not visual order. Some PDFs interleave columns line-by-line. Switch to "Normalize whitespace" to flatten the page into a single paragraph, or post-process the JSON output to re-order based on positional data.

How big a PDF can I extract?

Up to ~200MB or a few hundred pages comfortably in a modern browser. Very large files may take a few seconds; we never load the file outside RAM, so memory limits depend on your browser.

Is the file uploaded?

No. pdfjs-dist runs entirely in your browser. The file, the extracted text, and the search query never leave your device.