Skip to content

Extract text from a PDF

Pull the text out of a PDF in reading order, with columns untangled and wrapped lines rejoined into paragraphs, then copy it or save a .txt file; it runs in your browser, so the PDF never leaves your device.

Drop a PDF to extract its textor click to browse · up to 50 MB
Choose PDFProcessed on your device — never uploaded
Runs in your browser · no uploadHow it works

How to use PDF to text

  1. 1

    Open the PDF

    Drop a PDF of up to 50 MB onto the box, or click to pick one. Password-protected files ask for their password first.

  2. 2

    Pick a text layout

    Paragraphs gives clean running text for reading or pasting; Page layout keeps every printed line and lines up table columns with spaces.

  3. 3

    Choose pages and OCR

    Extract every page or a range such as 2-5, 9. Switch on OCR and pick the language if some pages are scans with no text layer.

  4. 4

    Copy or download

    Press Extract text, check the result in the box, then copy it to the clipboard or save it as a UTF-8 .txt file.

Limits and Pro

One PDF of up to 50 MB and up to 200 pages per extraction, OCR included.

Pro opens PDFs of up to 4 GB and reads up to 5,000 pages in one go. See Pro

About PDF to text

This tool reads the text layer that most PDFs carry, the same characters you could select in a PDF viewer, and puts it back in the order a person would read it. Copying straight from a viewer often mixes the two columns of an article line by line, breaks every sentence at the end of a printed line and leaves hyphens in the middle of words. Here, pages are split into columns and blocks first, wrapped lines are joined into paragraphs, a word hyphenated across two lines is rejoined, bullets and numbers stay at the start of list items, and a table comes out as rows with a tab between cells, so it pastes into a spreadsheet. A bare page number in the top or bottom margin is left out, and so is rotated or vertical text such as a diagonal "DRAFT" watermark.

Page layout mode does the opposite: it keeps each line exactly where it was printed, using spaces to hold the columns of a form, an invoice or a bank statement in place.

Scanned pages have no text layer, only a picture of the paper. When OCR is switched on, just those pages are read by the Tesseract engine in your browser, in one of 47 languages. Typical uses are quoting a report, feeding a contract into a translator or a word counter, and pulling figures out of a statement. Fonts, colours, images and links are not part of the output; for those, convert the PDF to Word instead.

Privacy

PDF.js parses the document in a Web Worker on your device and a second worker arranges the lines into paragraphs; the PDF and its text are never uploaded. Only if you switch on OCR does the page fetch the Tesseract engine and one language file from the jsDelivr CDN, once, and those downloads carry nothing from your document.

Features

Columns in order

Two- and three-column layouts are read one column after another, not line by line across the page.

Real paragraphs

Wrapped lines are joined and words hyphenated at a line break are put back together.

Tables you can paste

Table rows come out tab-separated, ready for a spreadsheet, or aligned with spaces in Page layout.

OCR for scans

Pages without a text layer can be read with Tesseract in 47 languages, on your device.

PDF to text: frequently asked questions

Why does copied PDF text come out jumbled, and does this fix it?
A PDF stores text as positioned pieces, not as sentences, so a viewer's copy follows the order the pieces were written in. Two-column pages then interleave line by line and every printed line ends with a hard break. In Paragraphs mode the tool finds the columns and blocks first, reads them top to bottom, and joins wrapped lines, so the text reads the way the page does.
Can it get text out of a scanned PDF?
Yes, with OCR switched on. Pages that have almost no text layer, fewer than 20 characters, are rendered at 300 DPI and read by Tesseract in the language you choose, while pages that already contain text are taken as they are. Expect occasional mistakes with similar-looking characters such as 0 and O, so check names and amounts. For a searchable PDF instead of a text file, use OCR PDF.
What is the difference between Paragraphs and Page layout?
Paragraphs rebuilds running text: one paragraph per line of output, with a blank line between paragraphs, columns read in order and line-break hyphens removed. Page layout copies the page line by line and pads with spaces so that columns of figures stay aligned, which suits invoices, timetables and forms. Open a Page layout file in a monospaced font such as Consolas or Courier to see the columns line up.
Are tables kept when I extract text?
Simple tables are recognised in Paragraphs mode and written as one row per line with a tab between cells, so you can paste them into Excel or Google Sheets and each value lands in its own cell. Merged cells and tables that are really pictures are not rebuilt. If a table comes out as loose lines, try Page layout, which keeps the columns in place with spaces.
Which characters and languages does the .txt file support?
The text file is saved as UTF-8, so Cyrillic, Greek, Arabic, Hebrew, Chinese, Japanese, accented Latin letters and Uzbek oʻ and gʻ all survive, as long as the PDF maps its fonts to real characters. Some PDFs embed fonts without that mapping; their copied text looks like random symbols in any program, and running OCR on those pages is the way around it.
All pdf tools