Skip to content

PDF to text

Extract the words as a plain .txt file.

Processed on your device

This tool runs entirely in your browser. Your file is never uploaded, and you can verify that in your browser's network tab. Verify it yourself: open your browser's network tab and watch. You will see one small request asking whether you have tasks left - a tool name and a hash, never the file.

What this does

This extracts the words from a PDF and writes them into a plain .txt file. A PDF does not store text as sentences - it stores glyphs at coordinates - so reading order, word boundaries and paragraph breaks are all reconstructed from the geometry of the page. Every extractor guesses that slightly differently, which is why the same document gives different output in different tools, and why there are two modes here rather than one.

Lifting a quotation out of a report without retyping it, feeding a document to a script or a language model, searching a book you only have as a PDF, or checking what a page actually contains when a table detector insists it found nothing.

How it works

  1. Drop the PDF onto this page. One file at a time, up to 300 MB.
  2. Choose reading order for prose you intend to paste somewhere, or layout to keep columns and tables lined up with spaces.
  3. Decide whether pages are separated by a marker line and whether page numbers are printed into the file.
  4. Leave rejoin hyphenated words on so a word broken across a line break comes back together.
  5. Under advanced options, set a page range, or switch the encoding to UTF-8 with a BOM if Excel or Notepad will open the file.
  6. Press Convert to text and the .txt downloads on its own.

The two modes solve opposite problems. Reading order joins the lines of a paragraph back into flowing prose, which is what you want in an email, a script or a quotation. Layout mode keeps every line where it was on the page, padding with spaces so columns stay aligned - right for a table, a code listing or a form, and wrong for prose, where the padding becomes ragged whitespace you then strip out. If the output looks strange, the mode is usually why.

Rejoining hyphenated words is more careful than a search-and-replace. A hyphen at the end of a line is joined only when the character before it and the first character of the next line are both lowercase, so a word broken as inter- and national comes back as international, while a compound such as self-service, or a hyphen followed by a capitalised name, is left as written. The rule errs towards leaving a real hyphen alone rather than towards editing your text.

A scanned document is detected before any work happens. The first five pages are sampled for a text layer, and when there is none the tool stops and points at OCR, since a scan is a picture of words with nothing in it to extract. Reporting no text found would be technically true and practically useless.

The encoding option is small and saves a familiar afternoon. UTF-8 without a byte order mark is what a script, a git repository or a text editor wants. UTF-8 with a BOM is what makes Excel and Notepad recognise the file as UTF-8 instead of guessing a legacy code page and mangling every accented character. If names come out as strings of symbols, the BOM is what was missing.

Extraction runs in a Web Worker and the text file is written there too, so a confidential document is never sent anywhere to have its words read. The result reports the page count, the character and word counts and how many pages came out empty - often the quickest sign that part of a document is scanned while the rest is not.

What this tool cannot do

  • Columns, sidebars, headers and footnotes come out in the order the reconstruction decides on, which is not always the order a person reads them in. Layout mode is often clearer for those pages.
  • A scanned page contains no text to extract. That is detected and reported with a link to OCR rather than writing an empty file.

Questions people ask

What is the difference between reading order and layout?
Reading order rebuilds paragraphs, joining the lines of each one into flowing text you can paste anywhere. Layout keeps the page shape by padding with spaces, so columns, tables and code listings stay aligned in a fixed-width view. Use reading order for prose and layout when the horizontal position of the text carries meaning.
Nothing came out of my PDF. Why?
Almost certainly because it is a scan. A scanned page holds a photograph of words, not words, so there is no text layer to extract from. The first five pages are sampled before any work starts, and if there is none the tool stops and sends you to OCR PDF, which turns the picture into real text you can then extract.
The text came out jumbled. Can that be fixed?
Try layout mode first - jumbled output usually means a multi-column page whose lines were joined across the columns. Layout keeps each column where it sat, which is easier to read and easier to clean up. Some documents also place headers, footers and margin notes in an order unrelated to how they are read, and no extractor can reliably know better.
Accented characters look wrong when I open the file. What now?
Switch the encoding to UTF-8 with a BOM and convert again. The byte order mark tells Excel and Notepad the file is UTF-8 rather than letting them guess a legacy code page, which is what turns an accented letter into two symbols. Leave it on plain UTF-8 for scripts, editors and version control.
Is the document uploaded to extract the text?
No. The PDF is parsed and the text file is written in your browser, and no part of the document is transmitted - worth knowing when the document is a contract or a medical record. You can watch the network tab of your developer tools during a conversion to confirm it: the one request there asks whether you have tasks left, and carries a tool name and a hash.

Related tools