Extract Text From a PDF

A PDF does not store words. It stores instructions to draw shapes at positions, and a copy of the text has to be worked back out of them. For Thai that is where most tools fail: a tone mark lands on the wrong letter, sara am turns into a space and a sara aa, and a space appears in the middle of a word. This reads the fonts inside the file to find out which letter each shape really is, puts the marks back where they were typed, and spaces the words the way the page shows them. Choose the pages, then copy the text or save it as a file. The document never leaves your machine.

1 · The document

2 · Which pages

Leave empty for every page, or write 1-3, 7, 12- as in a print dialogue.

3 · The text

Add a PDF to begin.

Frequently asked questions

Why does copied Thai come out as gibberish?

Two reasons. Either the file uses an old Thai font that stores letters by their TIS-620 codes without telling the reader, so "สวัสดี" pastes as "ÊÇÑÊ´Õ"; or the file does say which letter each shape is and says it wrongly, which Word and Excel do. Switching encodings in a text editor fixes only the first, by hand, every time. This reads the fonts inside the file, so both come out right without copying first.

Why does Thai copied out of other tools come out wrong?

Because the PDF holds shapes, and Thai uses different shapes for the same letter depending on what is around it. A tone mark over a tall consonant is drawn with a shifted copy of the mark; sara am is often drawn as a small circle plus a sara aa. Word writes those shapes into the file with the wrong letters attached, so a reader that trusts the file gets "กาหนด" for "กำหนด" and "มหำชน" for "มหาชน". This tool checks the letters against the font embedded in the file, which says what each shape was designed to be, and against the shapes themselves when nothing else does.

Why are there no stray spaces in the Thai?

Thai has no spaces between words, so a tool that puts a space wherever it sees a small gap puts one in the middle of words. The gaps were measured across hundreds of real Thai documents: letters of one word sit less than a twelfth of the type size apart, and a real word break is always wider. The line is drawn between the two, so a space appears where the page shows one and nowhere else.

Can it read a scanned document?

No, and it says so. A scanned page is a photograph of text: the file holds pixels and no letters at all. Reading it needs optical character recognition, which is a different tool. Pages like that are listed by number rather than quietly returned empty, so you know which ones need it.

What are the tabs for?

Tables. When two pieces of text sit far apart on a line, as the cells of a table do, they are separated by a tab rather than a space, so pasting into Excel or Google Sheets puts them in separate columns. If you only want the prose, untick the option and the columns are joined with a single space.

Some characters could not be read. What does that mean?

A few PDFs carry fonts that say nothing about which letter each shape is: no map, no names, and no other shape to compare with. Those characters are left out and counted, and the page they are on is named, rather than filled with guesses. The usual cause is a PDF that has been through a converter or a merger that damaged the fonts. Exporting again from the original document fixes it.

Can I paste it into Word or Excel?

Yes. Copy and paste; the text is ordinary editable text. With the tab option on, a table pastes into Excel or Google Sheets as separate columns. Saved as .txt, the file opens in Notepad or imports into Excel without Thai turning into question marks.

Does it convert a PDF to Word?

Not to a Word file. This gives you the text, not the page: pictures, bold, sizes and positions do not come with it. If what you want is to carry on writing in Word, which is why most people ask, copy the text here and paste it. A converter has to read the text out of the file the same way, so a Word file with broken Thai in it went wrong at exactly this step.

How is this different from sites where you paste text to fix it?

Those repair text after it has been copied, when the information about which shape is which letter is already gone, so some letters cannot be recovered, and they usually limit how much you can paste. This reads the PDF itself, uses everything its fonts say, has no limit, and the file never leaves your machine.

Is my document uploaded?

No. The PDF is read by your browser, in this tab. The site’s security policy sets connect-src ‘none’, so the browser blocks network requests from these pages, so nothing could be sent even if the code tried. The documents people take text out of are contracts, statements and reports, and that is exactly why it has to work this way.