LocalExcelTool
Get started

PDF to Text

Extract the text layer from a PDF and copy or save it as .txt.

Runs in your browserNo account neededFree up to 30 MB

What is PDF to Text

PDF to Text reads the text layer of a PDF with pdf.js and returns it as plain text you can copy or save as .txt. You can limit it to a page range. The PDF is never uploaded (up to 50 MB / 500 pages). Scanned PDFs contain no text layer, so the tool says so explicitly rather than returning an empty file — those need OCR instead.

File

No file chosen

… up to 30 MB

🔒 Everything runs in your browser. Nothing is uploaded.

What this tool actually does with your file

Where it runs
In your browser, on this page
Upload
None — the file never leaves your device
Size limit
30 MB free, 50 MB with Pro
Offline
Works with the network disconnected

Why extracted text sometimes comes out garbled

A PDF stores text as positioned glyphs, not as a flow of words. Extraction has to guess where spaces and line breaks belong from the coordinates, and that guess fails on multi-column layouts, tables and documents with unusual font encodings.

A scanned PDF contains no text at all, only images. Extraction returns nothing or a page of noise, and no amount of re-running will help: that document needs OCR, which is a different process and a different tool.

Ligatures (fi, fl) and custom font encodings are the other common source of odd characters. If the output has boxes or accented letters where plain Latin should be, the font's character map is non-standard.

Getting a usable result

Convert one page range at a time when the document is a complex layout. Reading twenty pages of extracted text to find where a table fell apart is slower than extracting and checking five pages at a time.

If you need the table structure, plain text is the wrong output — the row and column relationships are already lost. Use a table extraction path, or keep the PDF and read it.

For documents you will search repeatedly, extracted text plus the original PDF is more useful than either alone: the text is searchable, the PDF is authoritative.

How to use it

  1. 1.Choose a PDF
  2. 2.Optionally set a page range
  3. 3.Copy the text or save it as .txt

How PDF to Text works under the hood

A PDF is a graph of objects plus a cross-reference table that says where each object starts. Merging, splitting and reordering are structural edits to that graph — no page is re-rendered, which is why the output keeps its original quality.

  1. 1

    Load the document

    pdf-lib parses the object graph, following the xref table to every page, font and image stream. Encrypted files are rejected here.

  2. 2

    Copy page dictionaries

    Each selected page is copied into a new document, together with the resources it references (fonts, images, colour spaces).

  3. 3

    Rewrite the cross-reference

    Every object gets a new byte offset, so the xref table is rebuilt. A wrong offset is the classic cause of a 'damaged PDF' — this step is why the tool cannot simply concatenate files.

  4. 4

    Save and download

    The new document is serialised to bytes in memory and offered as a Blob download.

  5. Processing pipeline

Why signatures and forms break

A digital signature covers the exact bytes of the document. Any operation that rewrites the file — even adding a page number — changes those bytes and invalidates the signature. That is the signature doing its job, not a defect. AcroForm fields live in a separate object tree; operations that rebuild the page tree may drop their appearance streams, so test a form-heavy document before relying on the output.

Scanned PDFs have no text

Text extraction reads the text operators inside each page's content stream. A scan is a single image, so there are no text operators to read — the result is an empty or near-empty file. Recognising that text requires OCR, which this site does not provide. If a PDF's text can be selected in a viewer, extraction will work; if it cannot, no converter can invent it.

Compression is re-encoding, not magic

PDF compression re-packs streams with Flate and can downsample embedded images. A PDF that is already mostly JPEG will shrink only slightly; a PDF of scanned pages at 600 dpi can drop by 80%. Text stays sharp because text is not an image. The tool never silently deletes pages to hit a size target.

Verify it yourself

The original file is never sent anywhere. Confirm it in one run.

  1. 1.Open DevTools on this page and switch to the Network tab
  2. 2.Keep the filter on Fetch/XHR and run the tool
  3. 3.Confirm no request carries your file — you should see only page assets and fonts

Frequently asked questions

Can it read a scanned PDF?

No. A scanned PDF stores images, not characters, so there is no text to extract. Convert it to images and run OCR instead.

Is the layout preserved?

No. Text is joined in reading order, so columns and table positions are lost. It is meant for pulling out the words, not rebuilding the design.

What about password-protected PDFs?

They cannot be read. Provide a PDF with the password already removed.

Is this tool free?

Yes — no sign-up and no card. The free tier handles 30 MB. Everything runs in your browser, so your file is never uploaded.

What happens if my file is over the limit?

You see a notice before any processing starts, and nothing is charged automatically. Pro raises the limit to 50 MB. If you'd rather stay free, compress or split the file first.

What this kind of conversion cannot keep

PDF pages are copied as page objects, not re-rendered as images. Text stays selectable, the file size stays close to the sum of the inputs, and nothing is flattened. The one thing that cannot survive is a digital signature: any change to the bytes invalidates it, which is the signature working as designed.

More in PDF