PDFVertex Logo
    PDFVertex
    Back to Blog
    November 4, 2026Updated November 5, 20263 min readPDFVertex Team

    How to Extract Text from a PDF as a TXT File

    Copy all the text out of a PDF into a plain text file. How it works for normal PDFs, what to do with scans, and tips for clean results.

    PDFVertex extract text icon, a page with a plus-shaped text mark, beside the OCR and text to PDF icons

    Selecting text in a PDF and pasting it works for a paragraph. For a whole document, a text file is easier. You can search it, edit it or feed it to another program.

    Steps

    1. Open Extract Text from PDF.
    2. Add your PDF.
    3. Select "Extract text".
    4. Download the TXT file.

    The file has a heading for each page, such as --- Page 1 ---, and the text below it. Lines are rebuilt from how the text sits on the page. It runs in your browser, so the document is not uploaded.

    The Extract Text from PDF page with a 9-page file added and the Extract text button
    Add the PDF and select Extract text. You get a TXT file with a heading for every page.

    Scanned PDFs have no text to extract

    A scan is a photo of a page. There are no letters in it, only pixels. If the PDF is a scan, the result page says "No text found" and suggests OCR.

    To get text from a scan:

    1. Open OCR PDF.
    2. Pick the language of the document.
    3. Run it and download the text or a searchable PDF.

    OCR also runs in your browser, so a scan is not uploaded. More in how to OCR a scanned PDF.

    How to tell if a PDF has text

    Try to select a word with your mouse. If it highlights, the PDF has real text. If it selects the whole page like a picture, it is a scan.

    Tips for cleaner results

    • Columns. Text in two columns usually comes out in reading order, but check the result for pages with sidebars and tables.
    • Tables. Tables become lines of text. For data work, copy the result into a spreadsheet and clean it there.
    • Hyphens at line ends. Words split across lines may stay split. Use find and replace in your editor.
    • Fonts. A few PDFs use fonts that do not map to real letters, so the text comes out garbled. In that case run OCR on the PDF instead.

    When you need Word instead

    For a document you want to edit with layout, use PDF to Word. It also runs in your browser. It keeps headings and paragraphs, but not tables or columns.

    Related guides

    Try Our Free PDF Tools

    Put what you learned into practice with our free online PDF tools.

    Explore Tools