Extract text from a PDF

Turn a PDF's text layer into plain text you can paste, search or edit — one page or the whole document, in this tab.

Extract text from a PDF

Drop a PDF here

Or choose a file from your device

One PDF at a time · max 50 MB

The text layer is read in this tab — nothing is uploaded.

    No PDF added yet.

    Extracted text

    Three steps — nothing to install

    1. Add a PDF

      Drop one PDF up to 50 MB. Its page count appears before you choose a range.

    2. Pick the pages

      All pages by default, or a range like 1-3, 5, 8-10. A page past the end is reported, not guessed.

    3. Download the text

      The result is a .txt file; the preview shows the same text, with a word and character count.

    What a PDF's text layer really is

    A PDF does not store paragraphs. It stores instructions such as "draw these glyphs at this position in this font", page by page. There is no line-break character and often no space character between words — the gaps are just geometry.

    So extraction is reconstruction: this tool reads each glyph's position, groups glyphs that share a baseline into a line, orders them left to right, and inserts a space where the gap between runs is wider than about a quarter of the text height. That works well for a single-column page and produces mixed lines on a two-column page, where the columns share a baseline.

    Scans, pictures and OCR

    If the page is a photograph of text, there is no text layer to read. The tool will find almost nothing and say so instead of printing an empty file and calling it a success. Reading pixels is OCR, which needs a 10–12 MB language model; this site does not ship one.

    The quickest check is the word count after extraction. A 20-page scan that returns 40 words is a scan. If you need searchable text from one, run OCR first and extract from the OCR'd copy.

    What comes out, and what does not

    Lines, paragraphs and most punctuation survive. Hyphenated words split across a line break stay split, because the hyphen is part of the text. Tables come out as a run of lines rather than columns, and a header or footer is repeated on every page exactly as it appears in the file. Bold and italic styling is not marked, because plain text cannot carry it.

    The PDF itself is never modified: the download is a new text file. If you want the pictures instead of the words, use Extract images from PDF, and for a structural outline of the document use PDF to Markdown.

    Frequently asked questions

    Are my PDFs uploaded anywhere?No. The file is read with pdf.js in this tab and the text is written locally. There is no server request and no account.
    Why is the extracted text in the wrong order?The page positions glyphs individually. Two columns, sidebars, footnotes and floating labels share baselines, so a line-by-line rebuild mixes them. One column extracts cleanly.
    Does it work on a scanned PDF?No. A scan is an image with no text layer, and this tool does not do OCR. It reports that it found almost no text rather than producing an empty file.
    Can I extract text from only some pages?Yes. Type a range such as 2-4, 9 before extracting; the count updates as you type.
    Does it keep page breaks?Tick "Mark where each page starts" and each page gets a line like --- Page 3 --- in the text. Without it, pages run together with a blank line.
    Is the PDF changed or re-saved?No. The PDF is read only. The download is a separate .txt file, and your original stays exactly as it was.