Extract the text from a PDF

Get the words out of a PDF as plain text you can paste into a word processor, a spreadsheet or a translator. PDF.js reads the text layer page by page on your device. Choose how pages are separated, and whether to keep the original line breaks or rejoin wrapped lines into paragraphs.

✓ Runs in your browser — nothing uploaded Free, no sign-upNo watermark
    Downloads as .txt

    How to use the PDF to Text

    1. Drop a PDF that contains real text (not a photograph of a page).
    2. Choose whether to mark page boundaries and how to treat line breaks.
    3. Click Extract text.
    4. Read the preview, then copy it or download the .txt file.

    Text layer, not OCR

    A PDF made by a word processor, a browser or a report generator stores its words as text with positions. This tool reads that layer directly, which is why extraction is instant and perfectly accurate — there is no guessing. A PDF made by a scanner or a phone camera contains a picture of a page and no words at all; for those you need OCR, which this tool deliberately does not pretend to do. If nothing comes out, that is what has happened, and the tool says so instead of returning an empty file.

    Line breaks and paragraphs

    PDF has no concept of a paragraph. It records where each fragment of text sits, and the extractor infers line endings from that layout. Keep the lines reproduces the visual lines, which is right for poetry, code listings, addresses and tables. Rejoin into paragraphs merges consecutive lines into one long line, separated by blank lines — much better for pasting prose into a document or a translation tool, because you will not be left re-flowing every line by hand. Soft hyphens used to break a word across lines are removed.

    Page separators

    The --- Page 3 --- markers make it easy to find your place again in a long document, and they are trivial to strip later with a search and replace. Choose the form feed character if the text is heading for a tool that understands page breaks, or nothing at all if you want one uninterrupted flow.

    What does not come across

    • Tables lose their grid; cells arrive in reading order, usually row by row. For real tabular data, extract, then split on runs of spaces in a spreadsheet.
    • Columns are read in the order the file stores them, which is normally left column then right, but a badly built PDF can interleave them.
    • Headers, footers and page numbers come out too, repeated on every page.
    • Images, formatting, colour and links are not text and are not included.

    Privacy

    Contracts, medical letters and payslips are exactly the documents people paste into online extractors. Nothing here is uploaded: PDF.js runs inside this page, and the .txt file is assembled in your browser's memory. You can disconnect from the internet after the page has loaded and the tool still works.

    Frequently asked questions

    Why is the output empty?

    The PDF has no text layer — it is a scan or a photograph of a page. Reading it requires OCR, which this tool does not do.

    Does it keep the formatting?

    No. You get plain text. Bold, colour, fonts and layout are dropped; tables lose their grid and arrive in reading order.

    Can I extract text from only one page?

    Split the PDF first with Split PDF, then extract from the part you need.

    Is the text sent anywhere?

    No. Extraction happens in your browser and the .txt file is created on your device.

    Privacy

    This tool runs entirely inside your browser using WebAssembly and the Canvas/File APIs. Your files are never uploaded to ToolFlint or any third party; you can verify this in your browser's network tab or by switching to airplane mode after the page loads. Read how we process files.

    Last updated 2026-09-23.