Your files never leave your device. All processing happens locally in your browser.
How do I extract the text from a PDF — entirely in my browser, without uploading the file?
Open PDF to Text, drop a PDF onto the page (or use the file picker) and the tool reads it locally with Mozilla’s pdf.js engine, walking every page to pull out the real embedded text layer. It reconstructs the reading order from each glyph’s position on the page — detecting line breaks, paragraph gaps and column or tab spacing — so the output keeps the original formatting instead of collapsing into one run-on block. You get per-page tabs with word counts, live totals for pages, words and characters, an in-text search that highlights matches, and one-tap Copy plus download as .txt or .doc. Nothing is uploaded: the PDF is parsed on your own device and the text is written from a local Blob, so confidential documents never leave the tab. It works only on PDFs that already contain a text layer — a scanned or image-only PDF has no text to read, and the tool tells you to use the PDF OCR tool instead.
Extracts the real embedded text layer with Mozilla’s pdf.js — reads text that is already there, not a guess
Preserves formatting: rebuilds lines, paragraph breaks and column/tab spacing from each glyph’s x/y coordinates
Per-page tabs with word counts, live page/word/character totals, in-text search with highlighting, Copy and .txt / .doc download
Runs 100% in your browser — no upload, no account, no server — so the PDF never leaves your device
Needs a text layer; scanned or image-only PDFs yield no text — use the PDF OCR tool for those
What is
PDF to Text
PDF to Text is the extraction of the machine-readable text stored inside a PDF into plain, editable text. A digital PDF — one exported from a word processor, browser or design app — embeds its words as a text layer: actual character codes positioned on the page, separate from any images. Extracting that text means reading those characters directly and reordering them into natural reading order using each item’s x/y position, which is how line breaks, paragraphs and columns are recovered. This is distinct from OCR (optical character recognition), which is only needed when a PDF has no text layer — a scan or photograph of a page — and must infer characters from pixels. Direct extraction is faster and more accurate than OCR because it reads text that is already present rather than recognising it from an image. This tool performs the extraction entirely in the browser with Mozilla’s pdf.js, so the file is never uploaded.
PDF Tools
Related terms
PDFtext extractiontext layerpdf.jsgetTextContentOCRscanned PDFsearchable PDFplain textTXTcopy text from PDFPDF to Wordreading orderclient-side
Frequently Asked Questions
No. The PDF is parsed entirely in your browser with pdf.js, so the file never leaves your device — there is no upload, server or account.
Nothing is uploaded. When you choose or drop a PDF, the tool reads it locally with the browser File API and parses it in the tab with Mozilla’s pdf.js engine, extracting the text page by page on your own machine. The plain text you copy or download is built from a local Blob; there is no server, upload, database, login or tracking in the processing path. That matters because the PDFs people extract text from — contracts, statements, research papers, legal filings, medical records — are exactly the documents you would not want to hand to a cloud service. The tool works offline once the page is cached, and closing the tab discards everything. The only optional network use anywhere on the site is consent-gated advertising, which never sees your files.
Your PDF is almost certainly a scan or image-only file with no text layer. Direct extraction can only read text that is already embedded; for scanned pages use the PDF OCR tool instead.
PDF to Text reads the text layer that a digital PDF stores inside it — the actual character codes placed on each page. A scanned document or an exported image is really just a picture of text: there are no characters to read, only pixels, so extraction correctly returns nothing and the tool warns you and points you to PDF OCR. A quick way to tell which kind you have is to open the PDF in any reader and try to select a word: if individual words highlight, it has a text layer and this tool will extract them; if only a rectangular image highlights, it is a scan and needs OCR, which recognises characters from the image. OCR is slower and less certain than direct extraction, which is why this tool uses direct extraction whenever real text is present.
It preserves formatting. The tool sorts text by position and rebuilds line breaks, paragraph gaps and column spacing from each item’s coordinates, so the output reads like the page rather than one long paragraph.
Rather than dumping raw fragments, the extractor sorts every text item by its position on the page (top-to-bottom, then left-to-right) and reconstructs structure from the geometry: a vertical gap starts a new line, a larger gap inserts a paragraph break, and wide horizontal gaps are treated as spaces or tab-like column separators. The result keeps the shape of the original document, and you can review it per page using the page tabs or as one combined document. Be aware that layout reconstruction is heuristic: heavily designed pages, complex multi-column magazines, forms and tables may not map perfectly to plain lines, and true tabular structure is not rebuilt as a spreadsheet — for tables, the PDF to Excel tool is a better fit. Ligatures and unusual font encodings can occasionally affect a few characters.
Yes — it is free with no account and runs in any modern browser on a phone, tablet or computer. You can copy the text or download it as a .txt or .doc file, per page or for the whole document.
PDF to Text is completely free with no sign-up, watermark or limit, and because it is 100% client-side it works in any modern browser on Android, iPhone, iPad, Windows, macOS or Linux without installing an app. After extraction you can copy the text to the clipboard with one tap, download it as a plain .txt file, or download a .doc file that opens in Microsoft Word and other editors; the page tabs let you grab a single page or the entire document at once, and the in-text search helps you jump to a word before copying. One PDF is processed at a time and the whole file is held in browser memory, so a very large document is bounded by your device’s RAM; on a phone a big PDF may take a little longer, but the extracted text is the same.
Detailed Explanation
📖How It Works
Extracting a PDF’s Text in the Browser
PDF to Text pulls the machine-readable text out of a PDF and hands it back as plain, editable text — and it does the whole job in your browser, without sending the file anywhere. You drop a PDF onto the page or pick one; the tool reads it locally with Mozilla’s pdf.js engine, walks every page and extracts the embedded text layer, then rebuilds the reading order from the position of each piece of text so the result keeps the shape of the original document rather than collapsing into one run-on block. The extracted text is shown with per-page tabs and word counts, live totals for pages, words and characters, an in-text search that highlights matches, a one-tap Copy button, and downloads as a plain .txt file or a Word-compatible .doc. Because it reads text that is already stored in the file, extraction is fast and faithful — this is direct extraction, not OCR. It works on any PDF that contains a real text layer; a scanned or image-only PDF has no text to read, and the tool says so and points you to the PDF OCR tool.
Extracts the embedded text layer with Mozilla’s pdf.js — direct extraction, not OCR
Rebuilds reading order (lines, paragraphs, columns) from each text item’s position on the page
Per-page tabs and word counts, live page/word/character totals, in-text search, Copy, and .txt / .doc download
Runs entirely in the browser with the File API — no upload, server or account
📋Use Cases
When to Use PDF to Text — and When You Need OCR
Reach for PDF to Text whenever you have a digital PDF and want its words as plain text you can edit, quote, search, translate, feed to another tool or paste elsewhere: copying a passage from a research paper or e-book, lifting clauses from a contract, salvaging body copy from an exported report, pulling notes out of lecture slides, or preparing text for a summariser or translator. The one prerequisite is a real text layer, which digital PDFs exported from Word, Google Docs, a browser, LaTeX or design apps almost always have. The clear boundary is a scanned or photographed document: a scan is a picture of a page with no character data, so direct extraction returns nothing and OCR (optical character recognition) is required instead — the companion PDF OCR tool recognises characters from the image. A quick self-test settles which you have: open the PDF and try to select a word. If the word highlights, this tool will extract it; if only a rectangle highlights, it is a scan and needs OCR. For extracting tabular data specifically, PDF to Excel preserves rows and columns better than plain-text extraction.
Use it for any digital PDF whose text you want to edit, quote, search, translate or reuse
Prerequisite is a text layer — standard in PDFs exported from Word, Docs, browsers, LaTeX or design apps
Scanned or image-only PDFs have no text and need OCR instead (use the PDF OCR tool)
Self-test: if you can select a word in a reader it has text; if only a rectangle highlights it is a scan
🔧Technical Details
How the Text Is Extracted and Reflowed
When the page loads at /pdf-to-text it renders the PdfToText component (src/pages/tools/pdf/PdfToText.tsx), a self-contained React view backed by pdfjs-dist with its worker loaded locally. You add a PDF by drag-and-drop or the file picker; the handler accepts only application/pdf, reads the file into an ArrayBuffer and opens it with pdfjsLib.getDocument. It then loops over every page, calls page.getTextContent() and receives the page’s text items, each carrying its string plus a transform matrix that gives its x/y position, height and width. Rather than concatenating raw fragments, the tool reflows them: it sorts items top-to-bottom using the transform’s y value (PDF coordinates run bottom-up, so they are reversed) and then left-to-right by x; it starts a new line when the vertical gap exceeds roughly half the text height, inserts a blank line for a paragraph when the gap is larger, adds a space when the horizontal gap is wide enough, and a tab when the gap is large enough to read as a column. Each page’s reconstructed text and word count are stored, and progress is reported per page. Copy uses the Clipboard API (with a textarea fallback); the .txt download is a text/plain Blob, and the .doc download wraps the text in a minimal Word-compatible HTML document — all generated on-device and saved via a local object URL.
pdfjs-dist opens the file from an ArrayBuffer; the worker is bundled locally, not fetched from a CDN
page.getTextContent() yields text items with a transform matrix (position, height, width) per item
Reflow sorts by y then x and derives line breaks, paragraph gaps, spaces and tab-like column separators from the geometry
Copy via the Clipboard API; .txt is a text/plain Blob and .doc is Word-compatible HTML — all built on-device
⚠️Limitations
Honest Limitations
The extraction is faithful when a PDF has real text, but it is worth being precise about the edges. First and most important: this is direct extraction, not OCR. A scanned, photographed or image-only PDF has no text layer, so it returns nothing — the tool detects the empty result and directs you to the PDF OCR tool rather than pretending. Second, layout reconstruction is heuristic. Because a PDF stores loose positioned glyphs rather than a document model, the tool infers structure from coordinates, and heavily designed pages — multi-column magazines, newspapers, forms, sidebars and footnotes — can interleave or reorder in ways that do not match the visual flow. Third, true tables are not rebuilt as a grid: cell boundaries become spaces or tabs, which is readable but not structured data, so for spreadsheets the PDF to Excel tool is the better route. Fourth, some fonts use custom or non-standard encodings, or map ligatures and special characters unusually, so a small number of characters can come through wrong; extraction quality ultimately depends on how the PDF was authored. Finally, one PDF is processed at a time and the whole file is held in browser memory, so a very large document is bounded by your device’s RAM.
Direct extraction only — a scanned or image-only PDF yields no text; use PDF OCR for those
Layout reflow is heuristic; complex multi-column pages, forms, sidebars and footnotes may reorder
Tables become spaces/tabs, not a grid — use PDF to Excel to preserve rows and columns
Custom font encodings and ligatures can garble a few characters; one file at a time, bounded by device RAM
🔒Privacy & Security
Privacy: The PDF Stays in Your Tab
The documents people extract text from are frequently the private ones — contracts, bank and salary statements, medical and legal records, unpublished manuscripts and research — so uploading them to a cloud converter just to read their words would be self-defeating. This tool never does. The PDF is read with the browser File API and parsed on your own device with Mozilla’s pdf.js engine, whose worker is bundled with the app rather than pulled from a third-party CDN, and the extracted text is copied or downloaded from a local Blob. There is no server, upload, database, logging, API or account anywhere in the processing path, and no telemetry. The tool keeps working offline once the page has been cached, and closing the tab discards the file and every character of extracted text. The only optional network use anywhere on the site is consent-gated advertising, which never sees your files — a meaningful contrast with cloud extractors that require you to upload the very document whose contents you were trying to read.
PDF read and parsed entirely in the browser with pdf.js; nothing uploaded
No server, upload, database, API or CDN in the processing path; the pdf.js worker is bundled locally
No login and no telemetry; works offline once cached
Closing the tab discards the file and the extracted text; consent-gated ads never see your files
PDF to Text — capability, method and limits
Capability
Support
Notes
Extraction method
Direct text-layer extraction
Reads embedded characters with pdf.js getTextContent — fast and faithful, not OCR
Formatting
Reconstructed lines, paragraphs, columns
Reflowed from each item’s x/y position; heuristic, so complex layouts may reorder
Scanned / image PDFs
Not supported
No text layer to read — the tool flags it and points to the PDF OCR tool
Tables
As spaces / tabs
Readable but not a grid; use PDF to Excel to keep rows and columns
Output
Copy, .txt, .doc
Per page or whole document, with word/character totals and in-text search
Privacy & scale
In-browser, bounded by RAM
Read and parsed on-device with pdf.js, one PDF at a time; 100% client-side, no upload
PDF to Text extracts the embedded text layer from a PDF entirely in the browser with Mozilla’s pdf.js: the file is read with the File API, every page is walked with getTextContent, and the loose positioned glyphs are reflowed by position into lines, paragraphs and column spacing before being shown with per-page tabs, live totals and in-text search and offered as Copy, .txt or Word-compatible .doc. It is direct extraction, not OCR, so it is fast and faithful on any PDF that has a real text layer but returns nothing on a scanned or image-only file — which it detects and hands off to the PDF OCR tool. Layout reflow is heuristic, tables come through as spaces or tabs rather than a grid (use PDF to Excel), and unusual font encodings can garble a few characters. Everything runs on-device, one PDF at a time, bounded by your RAM; nothing is uploaded.