pdfMB

PDF to Text

Get all the text out of a PDF, in reading order and joined into paragraphs. Copy it or download a .txt file. Your file stays on this device.

  • No uploadYour file stays on this device.
  • Your original stays as it isYou download a new copy. Your file is never changed.
  • Free, no sign-upNo account and no daily limit.

What happens to your file

Everything below happens inside your browser, on your own device. The PDF is not uploaded, so nobody else, including us, can see it.

  1. Your browser opens the PDF with pdf.js, the PDF viewer built into Firefox, and reads every piece of text with its position and size.
  2. Pieces of text on the same line are joined into lines, and lines into paragraphs, so you don’t get a hard line break every few words. Words split with a hyphen at the end of a line are joined back together.
  3. Pages with two or three columns are read one column at a time. Copying from a PDF viewer often mixes the columns line by line instead.
  4. Lines that repeat at the top or bottom of most pages, such as running titles and page numbers, can be removed so they don’t interrupt sentences.
  5. Tables become one row per line, with the cells separated by tabs, so they paste into a spreadsheet in the right columns.
  6. Some PDFs, often ones saved from a web browser, mark certain characters as “no character”. In Thai these are usually tone marks above vowels. pdfMB rebuilds them from the fonts inside your file.
  7. Pages without text, such as scans, can be read with the same OCR engine as OCR PDF. Only the language data is downloaded, once.
  8. The .txt file is saved as UTF-8 on your device, so every language comes through, or the text is copied to your clipboard.
In short
  1. Choose a PDF
  2. Press “Convert to text”
  3. Check the preview
  4. Copy it or download the .txt file

How to get the text out of a PDF

  1. Choose a PDF or drop it on the box. pdfMB reads every page and tells you whether any pages are scans without text.
  2. If there are scanned pages, leave “Read the text of scanned pages (OCR)” on and pick the language of the document.
  3. Press “Convert to text”. A bar shows how far it has got.
  4. Look over the preview. You can keep or remove page headers and footers, mark where pages start, or switch to Markdown to keep headings and tables.
  5. Press “Copy all” to paste the text somewhere else, or download the .txt file.

Why copied Thai text often loses tone marks

Thai fonts have extra shapes for tone marks: a raised one that sits above an upper vowel, as in ที่ or น้ำ, and a normal one. The PDF stores which shape was drawn, plus a table that says which letter each shape stands for.

When a PDF is saved from Chrome, Edge and other Chromium browsers, that table often says the raised shapes stand for “nothing”. Copying the text, or a tool that trusts the table, drops the mark, and น้ำ (water) turns into นำ (lead).

In our test with a 35-page Thai Wikipedia article saved from Chrome, 1,915 tone marks were marked like this. pdfMB finds the right mark in the font inside the file, and all 4,911 tone marks came through.

When people use it

Reusing what you wrote

Get the text of an old report, letter or CV out of the PDF to edit it in any program.

Translating

Paste whole paragraphs into a translator, instead of lines that stop halfway through a sentence.

Searching and counting

Search a long document, count words, or compare two versions in a text editor.

Thai documents

Copy Thai text that keeps its tone marks, even from PDFs saved from a web browser.

What it can’t do

  • Only text is kept. Pictures, charts and drawings are left out. Use PDF to JPG to save them.
  • Bold, italic, headings and links become ordinary text. Use PDF to Markdown to keep them.
  • The exact position of text on the page is not kept. Text in boxes and margins is put into the flow of paragraphs.
  • Equations come out as plain text, with superscripts and subscripts on the same line.
  • Right-to-left languages, such as Arabic and Hebrew, have not been tested enough yet. Check the result carefully.
  • Password-protected PDFs, and PDFs whose owner has blocked copying, can’t be converted.

Questions about converting PDF to text

Is my PDF uploaded?

No. pdfMB reads the file inside your browser, and it never leaves your device. You can check this in your browser’s network tools.

Why not just copy from my PDF viewer?

Most viewers copy line by line, so every line ends with a break, columns get mixed and hyphenated words stay split. pdfMB joins lines into paragraphs, reads columns in order and can leave out page headers and numbers.

Does it keep Thai tone marks?

Yes. pdfMB also restores tone marks that some PDFs mark as “no character”. In our test all 4,911 tone marks of a 35-page Thai article came through.

Can it read a scanned PDF?

Yes. Turn on OCR and pick the language. Check the result, because OCR can misread names and numbers.

Which encoding is the .txt file?

UTF-8, which every modern editor opens, including Notepad, TextEdit and VS Code. All languages and symbols are kept.

Is there a page or size limit?

There is no fixed limit. Long documents take longer, and very large files can run out of memory on some phones.