PDF to Text
Choose one PDF, click Extract to TXT, and download everything the file already stores as text, page by page, with a marker line before each page. There are no settings and no sign-up, and nothing is uploaded — the document is read inside your own browser. Scans with no text layer need OCR instead, which this tool does not do.
Extracts the selectable text a PDF already contains. Pure scans need OCR, and your file isn't uploaded.
How to use
- Choose your PDF: Drop one PDF onto the box or click to choose it. One file at a time, up to 50 MB — if you drop several at once, none of them is added. To work on a different document later, remove the current one with ✕ first.
- Click Extract to TXT: The PDF engine loads at that moment and reads every page in order, from the first to the last. There is nothing to configure: no page range, no encoding choice, no layout switch. The button reads Extracting… while it works, and there is no progress bar or cancel button.
- Download the .txt file: A line above the result tells you how many pages of text were found and how big the file is. The download keeps your own name with a new extension: report.pdf comes out as report.txt. On a phone, Save to device opens the system share sheet when the browser offers file sharing, and simply downloads the file when it doesn't.
How this PDF to text converter works
This PDF to text converter extracts an existing text layer from one PDF up to 50 MiB and downloads it as a UTF-8 TXT file. Processing stays in your browser; scans without a text layer require OCR. What comes out is the text already inside the PDF — the same words you can select with your cursor in a reader. When you click Extract to TXT, the PDF engine (Mozilla's pdf.js) is fetched into the page, opens your file from memory and walks the pages from the first to the last, collecting the text objects on each one. Nothing is sent to a server, and there is no upload step, so contracts, invoices, statements and unpublished drafts stay on your own computer or phone.
The result is one plain .txt file in UTF-8, written without a byte-order mark. Pages come out in their original order, each introduced by a marker line that looks like ===== Page 1 ===== and separated from the next by a blank line, so you can still tell where page 7 began. Plain text is light: a five-page test file with two or three lines on each page produced a 663-byte .txt, and a three-page Chinese test file produced 1,153 bytes. Real documents vary enormously, so treat those as a sense of scale rather than a forecast.
The .txt exists only in the tab's memory until you save it. Refresh or close the page and both your chosen PDF and the extracted file are gone, with nothing left behind to clean up.
Why some PDFs give you no text at all
If the file is really a picture of a page — a flatbed scan, a phone photo, a fax — there is no text to pull out, and the tool says so instead of handing you an empty file. The check is deliberately strict: when every page comes back empty you get the message that the PDF has no text layer to extract, and no .txt is produced at all. A mixed document still works. If half the pages were typed and half were scanned, you get the file, and each scanned page shows up as a page marker with nothing underneath it, so the gaps are obvious.
Two other files get turned away before extraction even starts. A PDF that demands a password before it will open is refused, because there is no password box here — you get the shared message saying the PDF is password-protected. Open it in a reader with the password, save an unprotected copy, and extract from that; files that merely carry permission restrictions and still open without a password are usually read normally. Anything the engine can't parse at all — a damaged PDF, or a file with a .pdf name that isn't one — gets the message that the file isn't a valid PDF or is damaged.
Reading a scan takes OCR — optical character recognition — and this tool does none: it only reads text objects that the file already contains. There is no OCR tool on this site either, so the route is to turn the pages into images first and feed those to OCR software or an OCR service.
To get the pages out as pictures for OCR, use PDF to JPG.
What the .txt keeps, and what it drops
Everything that is not plain characters disappears, because a .txt file has nowhere to put it. Fonts, sizes, bold and italic, colour, line spacing, margins and columns are all gone. Images, vector drawings, comments and annotations, values typed into form fields, bookmarks, clickable links and the document's metadata are not extracted either — only the text objects drawn on the page are read.
Spacing is tidied up as each page is assembled. Trailing spaces and tabs at the end of a line are removed, and a run of two or more spaces or tabs becomes a single space. That matters for anything that was lined up with padding: a table whose columns were held apart by spaces collapses into one run of words, and row-and-column structure is not rebuilt anywhere in the output.
Some line breaks can be lost. The PDF engine sometimes reports a break as an empty text fragment, and empty fragments are skipped, so two pieces of text that sat on separate lines can end up on one line with a single space between them — in our two-page test file, the heading and the first body line of page 1 come out joined exactly like that. Reading order is whatever order the engine reports the fragments in, with no sorting by position, so a two-column layout, floating text boxes or an unusual content stream may come out in an order that doesn't match what you see on screen.
Non-Latin scripts come through as long as the PDF carries a correct character map: a three-page Chinese test file extracted completely, punctuation and digits included. A small set of characters is normalised on the way out — non-breaking and odd-width spaces become ordinary spaces, and the single-glyph fi and fl ligatures are split into separate letters. Ordinary Latin letters, accented letters and CJK characters are left exactly as they are.
| PDF content | TXT result |
|---|---|
| Existing text | Extracted |
| Fonts and layout | Not preserved |
| Images | Not extracted |
| Image-only scans | OCR required |
Opening the .txt, and jobs this tool doesn't do
The extracted text is not shown on the page. A .txt file can't be previewed in the result area, so what you get is the generic card with the file name, the note that this format can't be previewed here, and the download button. There is no editing box and no copy button — save the file and open it in whatever editor you prefer.
Because the file is UTF-8 with no byte-order mark, older versions of Windows Notepad and Excel may read it with the system code page and mangle accented letters or Vietnamese tone marks. The fix is at opening time, not at extraction time: pick UTF-8 in the encoding list, or use Excel's text import step and set the encoding there. If all you wanted was to copy text from PDF to Notepad, the same file does the job — open the .txt as UTF-8 and the characters are correct.
Having no options also means some jobs belong elsewhere. You can't pick a page range: every page from the first to the last is read, so narrow the document down first if a 400-page report is overkill. Only one PDF is handled per run, and several PDFs can't be turned into a single .txt, so merge them into one PDF first if that's what you need. The output is always .txt — there is no Word, Excel, Markdown or HTML export, and no way to reword or switch off the page markers.
To work on just one chapter, pull those pages into their own PDF with Extract PDF Pages first.
How this tool is checked
- The logic behind this tool is covered by 10 automated test cases (hand-checked examples, edge cases and invalid input), and they run again before every release.
- Before each release, a real browser opens this page, runs it on sample files (including a damaged one) and checks the file it produces.
- Your files are processed in your browser and are never uploaded to our server.
- Formulas, figures and definitions are checked against the sources listed at the end of this page.
Frequently asked questions
- Is my PDF uploaded to a server?
- No. The file is opened and read inside your browser, so it never leaves your device, and no copy is kept. Close or refresh the tab and both the PDF and the extracted text are gone.
- Why does it say my PDF has no text layer?
- Because its pages are images rather than text. Scans, photos of paper and faxes contain no text objects to read, so no file is produced. Getting words out of them needs OCR, which this tool doesn't do.
- Can it extract text from a scanned PDF?
- No — there is no OCR here. It reads only text the PDF already stores. Convert the pages to JPG or PNG images first, then run those images through OCR software or an OCR service.
- Can I extract only pages 5 to 10?
- No, every page is read, from the first to the last. There is no page-range box and no way to skip pages. Pull the pages you want into a separate PDF with Extract PDF Pages, then extract the text from that.
- Why is the spacing and line breaking different from the PDF?
- Because a .txt file stores characters and nothing else. Runs of two or more spaces or tabs are collapsed to one, trailing spaces are dropped, and breaks the PDF engine reports as empty fragments are lost, which joins a few lines together.
- Does the .txt have one section per PDF page?
- Normally yes. Each page gets a marker line carrying its number, and the page count above the result is read back from those markers. An extracted body line matching the tool's internal Chinese page-marker pattern can be mistaken for a page boundary. That line is removed and an extra section is created; the English Page markers in the downloaded TXT do not trigger this split.
- Can I convert several PDFs to text at once?
- One PDF per run. Dropping several files at once adds none of them, because the box takes a single file. If you want one .txt covering several documents, merge them into a single PDF first and extract from that.
- Why do accented characters look wrong when I open the .txt?
- Your program guessed the wrong encoding. The file is UTF-8 without a byte-order mark, which some older tools read as a system code page. Choose UTF-8 when opening it and the characters come back correctly.
Related tools
Cite this tool
Using a result in a report, paper or assignment? Copy a ready-made reference.
Gingertool. (2026). PDF to Text [Online tool]. Retrieved November 27, 2026, from https://gingertool.com/en/pdf/pdf-to-text/
“PDF to Text.” Gingertool, November 27, 2026, https://gingertool.com/en/pdf/pdf-to-text/. Accessed November 27, 2026.
@misc{gingertool-pdf-to-text,
author = {{Gingertool}},
title = {PDF to Text},
year = {2026},
url = {https://gingertool.com/en/pdf/pdf-to-text/},
note = {Accessed: 2026-11-27}
}