Skip to content
BabaPDF
Learn

How to convert a PDF to text

3 min readHow to

To pull the text out of a PDF, extract its text layer: it reads the real characters the file already stores and hands you plain .txt to copy or download. It works on text-based PDFs — a scan has no text layer, so OCR that first.

To get the text out of a PDF, open PDF to Text and extract its text layer — in your browser, with nothing uploaded. It reads the real characters the file already stores, so on a text-based PDF it is fast and exact. You get plain .txt you can copy straight away or download.

A flat dark document sheet with a folded top corner beside a bright lime panel crossed by several dark horizontal bars, like lines of text set apart from the page, on a pale cool-grey background
The real text layer is lifted out as plain text — no OCR, no screenshot.

How to do it

  1. Open PDF to Text

    Go to PDF to Text. It runs in your browser — no account, no install.

  2. Choose your PDF

    Drop in a single PDF. A password-protected file has to be unlocked first.

  3. Extract text

    Click Extract text. The words are pulled out page by page, the result downloads as a .txt file, and a Copy text button puts the whole thing on your clipboard. A note tells you the page count and flags any page that had no selectable text.

PDF to TextPull all the text out of a PDF as a plain .txt file.

Is this the same as OCR?

No, and picking the wrong one wastes time. Extracting text reads characters the PDF already contains, which any normal text-based PDF has. OCR is for a scan — a photograph of a page with no text underneath at all. If this tool reports that the PDF has no selectable text, it is a scan: run OCR PDF to add a text layer first — see how to make a scanned PDF searchable — and then extract.

Why is the spacing or order a little off?

Reading order follows the PDF's own text layer, not the visual columns, so a two-column page can interleave the two columns and a table flattens to space-separated text. Lines are rebuilt by grouping characters that share a baseline, and a space is added wherever the gap between two characters is wide enough — so word spacing is reconstructed from positions, not read from the file.

What you do not get

It is plain text, and only that. Headings, bold, tables and images do not survive, because a .txt file cannot hold them — a two-column report comes out as a single stream of lines. If you want the structure back, PDF to Word rebuilds headings and bold and italic from the same text; this tool is for when you just want the words, to paste into something else or feed to a script.

Keep reading