Tool / PDF

PDF to Text

Kitly PDF to Text runs locally in your browser and turns selectable PDF text operators into plain text. It does not read pixels as text.

StatusSelect a PDF to begin. Your file stays in this browser.

Pages-

Select a PDF to begin. Your file stays in this browser.

How to extract text from a PDF

This tool reads the text layer already stored in a PDF. It is best for digitally created documents, not scans.

  1. Choose a PDF

    Select the document and confirm the filename and size shown in the browser. The file is read locally.

  2. Extract the text layer

    Start extraction and keep the tab open while each page is processed in order.

  3. Review before reuse

    Check headings, columns, lists, page breaks, and special characters, then copy the result or download it as a text file.

When PDF-to-text works best

  • Try selecting a sentence in your normal PDF viewer; selectable text is a good sign that extraction will work.
  • Review tables and multi-column layouts carefully because visual reading order is not always stored clearly in the PDF.
  • Keep the original PDF nearby when quoting text so names, numbers, and punctuation can be verified.

Known PDF limitations

  • Scanned or image-only pages require OCR, which this tool does not currently perform.
  • Password-protected or encrypted PDFs are not supported.
  • Text extraction does not preserve the original typography, images, exact spacing, or page layout.

Practical guidance

These examples record what the extractor returned for original one-page PDFs: selectable text with accents, two side-by-side fragments, and an image-only page. Encrypted, corrupt, and empty files are included so their messages can be compared.

Extraction needs JavaScript because PDF.js reads the selected file in your browser. The measured examples, choices, and troubleshooting below remain readable when JavaScript is unavailable.

Measured PDF fixtures

Each file was written for Kitly. Text was collected with pdfjs-dist 4.10.38 on Node.js 22.19.0, using the same line assembly as this page. No third-party document or personal data is included.

Selectable text keeps accents

A one-page digital PDF with two WinAnsi lines extracts as two lines, including é, ã, and ç.

Text stored in the PDF

Kitly sample
Café da manhã: pão e ação.
Settings
File selectable-accents.pdf, 677 B, 1 page
First line x=72, y=720
Second line x=72, y=692

Extracted text

Kitly sample
Café da manhã: pão e ação.

What to check

The accents survived, and the 28-point vertical gap became a line break. The downloadable .txt file is that exact string, 44 B, with no extra trailing newline. This result comes from text operators already in the file.

Caveats

  • Font, size, and exact spacing are not part of the text file.
  • The grayscale image example on this page shows what happens when those text operators are absent.

Example files

Side-by-side fragments become one line

Two text fragments on the same baseline, at different horizontal positions, are joined into a single line.

Text operators in the PDF

Left café
at x=72, y=500

Right ação
at x=320, y=500
Settings
File two-column-layout.pdf, 670 B, 1 page
Left fragment x=72, y=500
Right fragment x=320, y=500

Extracted text

Left café Right ação

What to check

PDF.js returned both fragments on one line. The tool joins same-line items with spaces, so the 23 B result is “Left café Right ação”. The accents survived. The horizontal gap is not preserved, so compare this line with the PDF before treating it as the reading order.

Caveats

  • A table or multi-column page can flatten the same way. Check names and numbers against the original.
  • The .txt fixture is the extracted line only, with no extra trailing newline.

Example files

An image-only page stays empty

A page that paints a synthetic image and has no text operators produces an empty string and the selectable-text message.

Page contents

16×16 DeviceGray image, no text operators. 921 B, 1 page.

Tool result

No selectable text was found. This PDF may be scanned or image-based.

What to check

The text-item list was empty, and the extracted string was empty. The tool did not read pixels as words. OCR is a separate process, and this page does not run it. A valid blank page, empty-page.pdf at 421 B, produced the same message, so the wording means no selectable text was found.

Caveats

  • The image is an original 16×16 pattern made for this example. It is not a scan of a real document.
  • Copy and download stay unavailable when the extracted string is empty.

Example files

Encrypted, corrupt, and zero-byte files

These inputs fail before any text is shown, and the messages are not the same.

Tool messages

encrypted-example.pdf (933 B): Encrypted PDFs are not supported yet.
corrupt.pdf (64 B): The selected PDF could not be read in this browser.
zero-byte.pdf (0 B): The selected PDF could not be read in this browser.

What to check

The encrypted sample raises PDF.js “No password given”, which this page maps to the encrypted-PDF message. Its published password is example; the tool never asks for or sends a password. With that password, PDF.js can read the text “Public fixture”, which shows the file is encrypted. The corrupt sample raises “Invalid PDF structure.” The zero-byte sample raises “The PDF file is empty, i.e. its size is zero bytes.” Both of those become the generic read message.

Caveats

  • example is a published fixture password, not an account secret.
  • Removing encryption has to happen in a different program. This page will still refuse the file.

Example files

When extraction is enough

Choose by what is already stored in the PDF. This tool reads text operators. It leaves images untouched.

Selectable digital text

Use when: A normal PDF viewer lets you select a sentence, as in selectable-accents.pdf.

Trade-offs: The text file drops fonts, images, and exact spacing. Accents in the sample were preserved.

Columns, tables, or positioned lines

Use when: You can compare the result with the PDF, as with the two fragments at y=500.

Trade-offs: Same-line fragments can be joined. The sample became one 23 B line.

Scan or image-only page

Use when: The words exist only as pixels and you are using a separate OCR program.

Trade-offs: This extractor returns the empty selectable-text message. It does not infer words from the image.

When the result looks wrong

Messages below are the ones this page shows. The 25 MB and 200-page checks were exercised in memory; those oversized files are not published.

Problem: Encrypted PDFs are not supported yet.

Likely cause: PDF.js reported “No password given” for encrypted-example.pdf.

What to do: Open the file in a program that accepts the password, save an unencrypted copy, and extract that copy. Knowing the password example does not change this page.

Problem: The selected PDF could not be read in this browser.

Likely cause: corrupt.pdf has no valid PDF structure. zero-byte.pdf is empty, and PDF.js reports that the file size is zero.

What to do: Replace the file with a fresh export from the original program.

Problem: No selectable text was found. This PDF may be scanned or image-based.

Likely cause: The page has no text operators. scan-only.pdf and empty-page.pdf both did this.

What to do: Try selecting a sentence in a PDF viewer. If selection is impossible, the words are not in a text layer. OCR has to be done elsewhere.

Problem: Choose a PDF up to 25 MB.

Likely cause: The size check allows 26,214,400 bytes and rejects 26,214,401 bytes before PDF.js opens the file.

What to do: Split or recompress the PDF, then try again. The 40-megapixel image limit used by the image tools is not applied here, because this tool does not decode page images into pixels.

Problem: Choose a PDF with at most 200 pages.

Likely cause: A 200-page in-memory PDF passed the page check. A 201-page in-memory PDF was stopped after the page count was known.

What to do: Split the document into parts of 200 pages or fewer and extract each part.

Problem: Choose a PDF with a matching .pdf extension and application/pdf MIME type.

Likely cause: A file named notes.txt with type text/plain was rejected by the same check the page uses before extraction.

What to do: Choose a file whose name ends in .pdf and whose browser type is application/pdf.

Relevant sources

These describe the file format and the library used to read the text layer.

Frequently asked questions

What is PDF to Text used for?

PDF to Text extracts selectable text operators from a PDF so you can copy passages, search content, or move the text into notes. It does not keep visual column layout.

Will this work with scanned PDFs?

No. Scanned or image-only pages need OCR, which this tool does not run. Image-only files return an empty result and leave copy and download disabled.

Will PDF files be uploaded?

No. Extraction runs in your browser with PDF.js, so the selected PDF does not need to be sent to a server.

Why did two columns become one line?

Fragments on the same baseline are joined with spaces. In the published two-column sample, text at x=72 and x=320 became “Left café Right ação”. Compare that line with the PDF before quoting it.

Will an encrypted PDF open if I know the password?

No. The tool does not ask for a password. The published sample encrypted-example.pdf uses the password example and still shows the encrypted-PDF message.