Menu
Advertisement

Convert PDF to Text Online

Pull the text out of a PDF, copy it, or save it as a .txt file. Nothing is uploaded.

By Nethanel Bar, Co-founder & CEO

Last updated

Advertisement

Ready to actually learn to code?

Coddy teaches you by writing real code in your browser - interactive lessons, instant feedback, and AI help when you get stuck.

What is a PDF to text converter?

A PDF to text converter reads the words stored in a PDF and gives them back as plain text. Use it to copy a paragraph from a file that will not let you select text well, to feed a document into another program, or to search a long PDF in a text editor.

The tool reads the text of every page as soon as the file opens. The text shows in a box, with "Copy text" and "Download .txt" buttons. A checkbox, "Mark where each page starts", adds a line like --- Page 3 --- before each page. The text follows the order stored in the PDF. Columns and tables come out as plain lines.

This tool does not do OCR. A scanned PDF is a picture of a page and holds no text to read, and the tool tells you when that is the case. Your file never leaves your device, because the reading runs in your browser. If the PDF needs a password to open, the tool asks for it.

What you'll learn while extracting text

  • A PDF can hold real text or only a picture of text. Real text can be read and copied. A scan is pixels, and getting words from pixels is a different job called OCR.
  • Plain text is the simplest file format: just characters. That is why it works in every editor and every program.
  • A PDF stores text in the order it was drawn, not always the order you read. Columns, tables and headers can come out mixed, which is why programs that read PDFs often clean up the result.
  • Extracting text is a few lines of code with a library like PyMuPDF. The Python example below does what this page does, so you can reuse it in a script.

How to extract text from a PDF

  1. Open your PDF

    Drop the file on the page or click "Choose a PDF file". If it needs a password to open, type it when asked.

  2. Wait for the text

    The tool reads every page and shows progress. The text then appears in the box.

  3. Choose page marks

    Keep "Mark where each page starts" ticked to get a --- Page N --- line before each page, or untick it for one continuous text.

  4. Copy or download

    Click "Copy text" to put it on your clipboard, or "Download .txt" to save a text file named after your PDF.

What to expect from different PDFs

Whether the text comes out depends on how the PDF was made.

Kind of PDFWhat you get
Exported from Word, Docs or a websiteThe text, in its stored order
Scanned page or photo of a pageNothing: it holds a picture, and the tool says there is no text
Text with columnsLines of the columns can come out one after another or mixed
TablesPlain lines of text, without the grid
Text drawn as shapes or outlinesMay be missing, because it is not stored as text
PDF with only an owner passwordOpens without asking for a password
PDF that needs a password to openThe tool asks for the password first
Page marks tickedA --- Page N --- line before each page

Extraction examples

Copy a paragraph from a report

Steps

Open the PDF > Copy text > paste into your document

Faster than selecting across page breaks, and the page marks help you find where a passage came from.

Page marks on and off

Marks on

--- Page 1 --- Introduction --- Page 2 --- Methods

Marks off

Introduction Methods

Keep the marks to know where each page starts. Turn them off for text you want to paste as one piece.

A scan with no text

Result

This PDF has no text to copy. It is probably a scan or a photo of a page.

You will see this message for a scanned PDF. There are no words stored in the file, only a picture of them.

Do the same in Python

extract.py
import pymupdf
doc = pymupdf.open("report.pdf")parts = []for number, page in enumerate(doc, start=1):    parts.append(f"--- Page {number} ---\n{page.get_text()}")
with open("report.txt", "w", encoding="utf-8") as f:    f.write("\n\n".join(parts))

page.get_text() returns the text of one page. The loop adds the same page marks as the checkbox on this page.

Common mistakes

  • Trying a scanned PDF. A scan holds a picture, not text, so there is nothing to extract. This tool does not do OCR.
  • Expecting tables to keep their grid. Tables come out as plain lines of text, so you may need to tidy them.
  • Trusting the reading order of columns. Check text from multi-column pages before you use it.
  • Leaving page marks on when you paste into a finished document. Untick the box first if you do not want the --- Page N --- lines.
  • Opening a huge PDF on a phone. The browser may run out of memory above a few hundred MB. A computer handles big files better.

PDF to text FAQ

Is it free to extract text from a PDF here?

Yes. There is no sign-up and no watermark, and nothing to pay.

Is my PDF uploaded to a server?

No. The text is read in your browser, so the file stays on your device.

Why does it say my PDF has no text?

The file is probably a scan or a photo of a page. It holds a picture of the words, not the words themselves, and this tool does not do OCR.

Can I copy the text from a PDF?

Yes. Click "Copy text" and paste it anywhere.

How do I save a PDF as a .txt file?

Click "Download .txt". The file is named after your PDF.

What does "Mark where each page starts" do?

It adds a line like --- Page 2 --- before each page's text, so you can see where pages begin. Untick it for one continuous text.

Why are my columns or tables out of order?

The tool follows the text order stored in the PDF. Columns and tables come out as plain lines, which can look different from the page.

Can I extract text from a password-protected PDF?

Yes. If the file needs a password to open, the tool asks for it. A PDF that only restricts printing or copying opens without one.

Can I extract PDF text with Python?

Yes. A library like PyMuPDF reads the text of each page with get_text(), as in the example above.

Other developer tools

Coddy programming languages illustration

Learn to code with Coddy

Get started