Skip to content

PDF to text

Copy all the text out of a PDF.

Drop a PDF here

Only your browser reads them.

How to use PDF to text

  1. Drop one PDF onto the page. Click Choose a file or drag a PDF into the drop zone to start reading immediately.
  2. Review the extracted text and formatting. Toggle Keep line breaks as in the PDF to either preserve visual line endings or join wrapped lines into paragraphs.
  3. Copy or download the output. Click Copy text to place everything on your clipboard, or click Save .txt to download a UTF-8 text file.

Your files are processed on this device and never uploaded. They stay private, and there's nothing to delete afterwards.

How does browser extraction read digital and scanned PDFs?

The extractor reads your PDF locally in memory using pdf.js for digital text layers and switches to self-hosted Tesseract OCR whenever a page contains only scanned images. Because all parsing and character recognition execute inside your browser tab, 0 bytes leave your device.

Reading embedded text streams with pdf.js

As soon as you drop a document, pdf.js opens the file and walks through every page sequentially. For digitally authored PDFs, it calls getTextContent() to collect text runs along with end-of-line markers in reading order.

Extra trailing spaces and runs of three or more consecutive newlines are normalized so the preview stays clean. A 50-page digital report typically finishes reading in moments without any manual button click before the preview appears.

When a page mixes selectable text with embedded screenshots, the extractor inspects the existing character count first. If a page has fewer than 24 non-whitespace characters, it supplements or replaces that sparse layer with OCR output.

Automatic local OCR fallback for scanned pages

When a page has little or no embedded text, the tool automatically triggers optical character recognition powered by the Tesseract OCR Official Documentation engine served locally from this site. Each scanned page is rendered onto a canvas capped at 4,000 pixels on a side and 16,777,216 total pixels.

Small scans narrower than 1,600 pixels are upscaled up to 3x before recognition so thin characters read more reliably. Words scoring below a confidence threshold of 30 are filtered out, and a notice tells you how many pages used OCR so you can verify names and figures. If you are starting from a screenshot or camera photo rather than a PDF, use browser-based image to text directly.

Controlling line breaks, paragraph wrapping, and word counts

PDF documents position every line at fixed coordinates rather than storing flowing paragraphs like a word processor. That difference explains why raw copy-paste from a PDF viewer often breaks sentences mid-line.

Keeping PDF line breaks versus joining paragraphs

By default, Keep line breaks as in the PDF is checked so every end-of-line marker from the page layout stays intact. That mode works well for poetry, addresses, code snippets, or numbered lists where each line should stay separate.

Unticking Keep line breaks as in the PDF joins single line breaks inside a paragraph into spaces while keeping blank-line paragraph breaks intact. Because the raw per-page text array stays cached in memory, toggling the checkbox updates the output instantaneously without re-reading the PDF.

This unwrapping behavior is especially useful when pasting academic articles or legal briefs into an email or translation tool. Sentences no longer split awkwardly at 70-character column edges.

Checking the live Words found counter

The options panel displays a live Words found count computed directly from the active output text. Watching that figure helps confirm that a scanned contract or multi-page appendix actually yielded readable text before you copy it.

If you need deeper metrics such as character counts with and without spaces, sentence totals, or estimated reading speed, paste the extracted text to check exact character and reading-time metrics. That workflow is handy for editors verifying manuscript limits.

Plain .txt output versus structured Markdown and table layouts

Plain text strips away bold styling, font sizes, headings, and grid borders, leaving universal character sequences as defined in the Library of Congress UTF-8 Plain Text Format Specification. Choosing the right output format depends on where the text is going next.

Output format Keeps headings and lists Keeps tables OCR on scans Best destination
Plain .txt No No Yes Email, grep, diffs, raw notes
Markdown .md Yes Yes (pipe tables) Yes AI chats, Obsidian, GitHub
Word .docx Yes Yes Yes Office editing and redlines
CSV / Excel No Yes (rows/columns) No Spreadsheets and accounting

Because plain text has no column delimiters, multi-column newsletters and financial tables collapse into sequential reading lines. When you need headings, bulleted lists, and aligned data tables preserved for notes or AI prompts, export headings, lists, and tables as Markdown instead.

Plain UTF-8 files remain the safest format for long-term readability because any operating system, terminal, or code editor can open .txt without proprietary software. Every character is stored without hidden styling tags or binary wrappers.

Copying to clipboard, saving UTF-8 files, and troubleshooting

Once the extracted text appears in the preview box, you have two ways to take it with you. Clicking Copy text writes the full string to your system clipboard via the MDN Web Docs Clipboard.writeText() API and flashes Copied for 1,600 ms.

Clicking Save .txt creates a local Blob URL encoded as text/plain;charset=utf-8 and downloads <filename>.txt straight to your device. After editing or cleaning up the extracted draft, you can turn edited plain text back into a printable PDF with clean margins.

Tip: If a scanned PDF returns an error saying no text could be read, the scan may be too faint, skewed, or low-resolution for OCR. Re-scanning at 300 DPI or higher contrast usually resolves recognition failures.

Documents protected by an open password cannot be decoded until unlocked, while PDFs that merely restrict printing or copying in desktop viewers still open normally here when no open password is set. You can click Change file at any time to clear the current document from memory and load another PDF.

Because each extracted file is encoded in UTF-8, accented characters, currency symbols, and non-Latin scripts transfer cleanly into modern editors. You do not need to worry about legacy code-page garbling when opening the downloaded .txt file.

Questions

Does PDF to text work on scanned PDFs?

Yes. Any page that lacks a digital text layer is automatically read using self-hosted Tesseract OCR right inside your browser tab. Scanned pages take a few seconds per page, and you should double-check proper names and numbers afterwards.

Why does extracted PDF text have broken lines?

PDF files store text as positioned lines rather than reflowing paragraphs, so each visual line ends with a line break. Untick Keep line breaks as in the PDF to join single line breaks inside paragraphs while keeping blank lines between paragraphs.

Does plain text extraction keep tables and columns?

Plain text extraction outputs words in reading order without table borders or multi-column grid spacing. If you need headings, bullet lists, and pipe tables preserved, use a PDF to Markdown converter instead.

How do I save extracted PDF text as a .txt file?

Once the extraction finishes and the text appears in the preview box, click Save .txt in the options panel. Your browser generates a UTF-8 plain text file named after your original PDF without uploading anything.

When should I use PDF to text instead of PDF to Markdown?

Use PDF to text when you want raw unformatted prose for email drafts, search indexing, diffing, or pasting into an editor without any hash headings or pipe characters. Choose Markdown when document structure matters.

Are my PDF files uploaded when extracting text?

No. Both digital text parsing and Tesseract OCR run locally inside your browser using self-hosted scripts and language data, so 0 bytes of your document leave your device.

Updated