Skip to content
cliplimeClipLime

Extract the text from a PDF

Read the text layer of any PDF page by page, with columns in the right order, then copy it or save it as a .txt file. Everything stays on your device.

Runs on your device, nothing is uploaded

or drop it here, or paste from the clipboard

One PDF file. The text is read on your device and appears here, with options for page markers and paragraphs. Nothing is uploaded.

At a glance

What it does
Copies the text out of a PDF, page by page, into a box you can copy from or save as a .txt file.
Works on
PDFs with a text layer, which is text you can select in a viewer. Scanned pictures have none, and there is no text recognition (OCR) here.
Options
Page markers like --- Page 3 ---, line breaks as in the PDF or joined into paragraphs, and a page range such as 1-3, 5, 8-.
Reading order
Columns are read one after another, tables across, and right to left text and Chinese, Japanese and Korean text come out in reading order.
Counts
A word count for every page, and a note of how many pages had text.
Also included
Text typed into form fields and the text of comments, which you can switch off.
Privacy
The text is read on your device. The PDF is never uploaded.

How to do it

  1. 1

    Choose a PDF

    Choose one PDF file, or drop it on the page. A PDF protected with a password or with permission settings cannot be opened here.

  2. 2

    Choose the pages

    Leave the Pages box empty for the whole document, or type pages like 1-3, 5, 8-. Only the pages you ask for are read.

  3. 3

    Set the options

    Choose As in the PDF or Paragraphs for the line breaks, and turn Page markers on if you want to see where each page starts. The text changes at once, without reading the file again.

  4. 4

    Copy or download

    Press Copy to put the text on the clipboard, or Download to save it as a .txt file named after the PDF.

Where the text comes from, and what it cannot do

A PDF can hold a page in two very different ways. A PDF made from a document, a web page or a spreadsheet contains real text: every piece has its characters and its position. That text layer is what you copy when you select words in a viewer, and it is what this tool reads. A PDF made by scanning paper holds a picture of each page, with no characters in the file to copy.

ClipLime does not read text from pictures, so a scanned PDF gives no text, and the tool says so plainly: "This PDF looks like scanned pictures, so there is no text to extract. This tool does not read text from pictures (no OCR)." If only some pages are pictures, such as a report with a scanned appendix, the other pages are read and the pages without text are named. You can still save the scanned pages as pictures with PDF to Image and use a program that recognises text.

Two other cases are worth knowing. Some scanned PDFs carry an invisible text layer added by a scanner or an OCR program, and that text is read, mistakes included. In some PDFs the fonts do not say which letters they draw, so the text layer copies as squares and symbols. The tool notices such pages and says they do not read as text.

Reading order, columns and tables

A PDF does not store paragraphs. It stores pieces of text, each with a position, in the order the program drew them, which is not always the order you read them in. The tool rebuilds reading order from the positions: pieces on the same baseline become a line, lines are stacked from top to bottom, and a strip of empty space that runs down the page marks a column. Columns are read one after the other, so a two column article comes out as the left column, then the right, and a title across both stays above them.

A table is not split into columns. When short cells line up in rows, each row is read across and the cells are separated by tabs, so the result pastes into a spreadsheet. A table with long cells that wrap onto several lines can be read in an odd order, and a row where the gap between cells is narrow may lose its tab.

There are limits. Overlapping text boxes, text wrapped around pictures and unusual designs can come out in a different order from the one you would read. Text turned another way, such as a vertical label in a margin, is added after the main text. Headers, footers and page numbers are text on the page, so they appear with each page: a running head above the columns comes first and a footer or page number under them comes last. Where two columns almost touch, pdf.js can report a line of each column as one piece of text, and those two lines then come out together. Look at one page before you rely on a long document.

Line breaks, paragraphs and hyphens

As in the PDF gives one line of text for every line of the page, with a blank line where reading jumps to another column or block. It is the safest choice for tables, addresses, code and poems.

Paragraphs joins the lines of a paragraph into one line and puts a blank line between paragraphs. A line continues into the next when it runs up to the right margin and the first word of the next line would not have fitted after it. A gap between lines, a change of type size, a bullet or number, or an indented first line starts a new paragraph, and short lines such as a list or an address stay lines. A paragraph that runs from the bottom of one column to the top of the next is joined too, when the column ends flush with its margin and the next one does not start a new sentence. It is a careful guess, so check the result if the layout matters. A paragraph that runs onto the next page is not joined across the page break.

A word split at the end of a line is joined again only when the evidence is clear: the hyphen is a soft hyphen, the invisible kind typesetters insert, or the word appears whole elsewhere in the text, or in another form such as a plural. Otherwise the hyphen stays, so a real compound such as long-term is never damaged, and a split word may keep its hyphen. Page markers put a line like --- Page 3 --- before each page.

Other scripts, form fields and word counts

Right to left text, such as Arabic and Hebrew, comes out in logical order, the order you would type it, with numbers and Latin words kept intact inside it, and brackets the right way round. Chinese and Japanese text is joined without spaces, as it is written, and Korean keeps its spaces. Arabic presentation forms and ligatures such as fi are turned back into ordinary letters, so the text can be searched.

With Form fields and comments on, text typed into form fields (with the name of the field) and the text of comments and notes is added at the end of each page. Switch it off for the page text alone.

Words on each page lists a count for every page and marks pages without text. Words are runs of text separated by spaces, and Chinese, Japanese and Korean characters are counted one by one, so those counts are rough. To count or tidy the result further, use Word Counter or Text Cleaner.

Questions people ask

Can it get text out of a scanned PDF?

No. A scan is a picture of the page, and ClipLime does not read text from pictures (no OCR). The tool tells you when a PDF looks like scanned pictures. If the scan already has a hidden text layer from an OCR program, that text is read.

Are my PDFs uploaded to a server?

No. The PDF is opened and its text is read inside your browser, and the result is created on your device. Nothing is sent to ClipLime or anyone else.

Why is the text in a strange order, or broken into odd lines?

A PDF stores positioned pieces of text, not paragraphs, so the order has to be worked out from where things sit on the page, and complex layouts can confuse that. Try As in the PDF to see the lines as drawn.

Does it keep headings, bold text, images or tables?

It gives plain text only. Fonts, bold, colours and images are not kept. Rows of a table that line up are kept as rows, with tabs between the cells.

Can I extract the text of only some pages?

Yes. Type the pages in the Pages box, like 1-3, 5, 8-. Only those pages are read, and the word counts and the downloaded file cover only them.

Why do I see squares or odd symbols instead of letters?

Some PDFs use fonts that do not say which letters they draw, so the text layer cannot be turned back into text. The tool marks such pages. Copying from a viewer usually gives the same result, and you need a version of the PDF with a proper text layer.

Guides that help

All PDF guides →