PDF to Text — Free Online
Extract text from a PDF in your browser. Page order is kept; Arabic and mixed lines follow the PDF's visual order. Download the result as UTF-8 text.
Private by design — files stay in your browser
Add a PDF file to get started.
Drag & drop a PDF here
one file at a time — it never leaves your browser
How it works
PDF to Text reads the text layer already stored in your PDF and rebuilds visual lines with the same geometry used by PDF to Word, then groups them into paragraphs page by page. Nothing is uploaded: the PDF is parsed with pdf.js in your browser, and the result appears in a searchable viewer before you copy or download it. Extraction is faithful rather than speculative — mixed Arabic and English lines follow the PDF's visual order, and repeated characters are kept as stored. There is no OCR here, so a PDF made only of scanned images has no text to extract.
How to use it
- Under 'Drag & drop a PDF here', click 'Choose a PDF' (or drag the file in). One PDF at a time; extra files are ignored with a warning. Encrypted PDFs are refused at load with an instruction to unlock them first.
- The file card shows the name, size, and page count. Under 'Pages', keep 'All (N)' or choose 'Custom' and enter a 1-based range such as 1-3,5; an invalid range shows an inline error.
- Click 'Extract Text'. If the selected pages have no stored text, a 'No text to show' panel explains the PDF may contain scanned images and that OCR is not enabled in this tool.
- In the 'Extracted text' panel, check the character and word counts. Use 'Search in text…' to highlight matches, with a match counter and up/down buttons to jump between them.
- Click 'Copy all text' for the clipboard (or select the text manually), 'Download .txt' to save <name>.txt as UTF-8, or 'Start over' to change the page range.
What gets extracted
Only the PDF's existing text layer is read — no images, tables, or layout are reconstructed. Positioned text runs are rebuilt into visual lines and grouped into paragraphs, with each page prefixed by a header like '--- Page 2 of 10 ---'. Pages with no text still get a header, so page numbers in the output stay truthful. Selected pages are emitted in ascending page number order regardless of the order you typed them.
Fidelity and language order
The output mirrors what the PDF stores. Mixed-direction lines keep the visual order of the text layer rather than being rebuilt into logical reading order, so an English word inside an Arabic line may appear reversed relative to speech. Legitimate repeated characters such as '1111' or 'coffee' are preserved, and unusual or duplicated glyph layers can show up as repeats because no aggressive character-level deduplication is applied. The viewer notes this so you can judge the result before copying.
Search and export
The search field highlights matching text inside the viewer and reports which match you are on. To keep large documents responsive, highlighting is capped at 2,000 matches — the counter shows a '+' when the cap is reached, but the full text is still present. 'Copy all text' writes the complete result to the clipboard; 'Download .txt' encodes it as UTF-8, so Arabic and other non-Latin scripts survive. The PDF and extracted text never leave your device.
Formats & limitations
- PDF input only, accepted by application/pdf MIME type or a .pdf filename; one file at a time, and an empty PDF is rejected.
- Password-protected PDFs are refused at load; unlock them with Unlock PDF before extracting.
- Output is a plain UTF-8 .txt file named after the source PDF (<name>.txt), with '--- Page N of M ---' separators and blank lines between paragraphs.
- No OCR is performed. Image-only or scanned PDFs return zero characters; use OCR PDF for those files.
- Only stored text is returned — no tables, images, formatting, or document structure. Mixed-direction lines follow visual order, and duplicated glyph layers may appear as repeats.
- Page selection is 'All' or a 1-based 'Custom' range such as 1-3,5; results are sorted by page number, and highlighted search matches are capped at 2,000 for responsiveness.
- No coded file-size or page-count limit was found. Extraction runs locally with no uploads.
How results are validated
- Input must be at least 5 bytes of a readable, unencrypted PDF; invalid bytes and encrypted files are rejected with specific messages.
- Custom ranges use 1-based page numbers within the document; malformed, reversed, or out-of-bounds entries show an inline error and block extraction.
- Selected page indices are deduplicated, bounds-checked, and sorted before the text layer is read.
- The .txt download is UTF-8 encoded, so Arabic and other non-Latin characters are preserved; mixed-direction lines keep the PDF's visual order.
Troubleshooting
'“name” is not a PDF file.', 'This PDF has no pages.', or a warning that other files were ignored.
Add one non-empty PDF per run. Other file types are rejected, blank documents have nothing to extract, and extra files are ignored with the kept file named in the message.
'This PDF is password-protected. Unlock it first, then extract its text.'
Open Unlock PDF, remove the password you know, and then extract text from the unlocked copy. This tool never tries to guess passwords.
'No text to show' — 'No selectable text was found in this PDF. This PDF may contain scanned images.'
The pages contain pictures rather than a text layer. Use OCR PDF to recognize the text first, then extract from the searchable result.
A red page-range message or an error when clicking 'Extract Text'.
Use 1-based numbers and ascending ranges within the document, for example 1-3,5. Out-of-range pages are rejected before extraction starts.
Arabic and English appear in an unexpected order, or characters look duplicated.
This is faithful extraction of the stored text layer: mixed-direction lines follow visual order, and repeated glyphs are not aggressively removed. Legitimate doubles such as 1111 or coffee are kept.
'Copy failed — select the text manually.' or 'Unable to read this PDF in your browser. Please try another PDF.'
Select the text in the viewer and copy it yourself, or try a different copy of the file. If the PDF still cannot be parsed, another copy may be needed; nothing is uploaded.
Real-world examples
- Extract all text from a report into <name>.txt, using the page headers to find a quote on page 17.
- Limit extraction to pages 5–9 of a manual with a Custom range of 5-9.
- Search the extracted text for a clause name, jump between matches, and copy the passage into an email.
- Try a scanned contract, see the 'No text to show' message, then run OCR PDF on it instead.
- Unlock a password-protected PDF with Unlock PDF, then return here to extract its text.
Frequently asked questions
Can this read text in scanned PDFs?
No. This tool reads the text layer already in the PDF and performs no OCR. Image-only pages return zero characters with a 'No text to show' message. Use OCR PDF first if your document is a scan.
Will it keep the layout, tables, or images?
No. The result is plain text: positioned lines are grouped into paragraphs in the PDF's visual order, with a page separator for each page. Images, tables, and formatting are not part of the output.
Why can Arabic or mixed English text look out of order?
Extraction mirrors the PDF's stored text layer. Mixed-direction lines follow visual order rather than being reconstructed into logical order, and no aggressive deduplication is applied — legitimate doubles like '1111' or 'coffee' always survive, while unusual glyph layers may show as repeats.
Can I extract only certain pages?
Yes. Keep 'All (N)' or choose 'Custom' and enter a 1-based range such as 1-3,5. Results are emitted in ascending page order, and each page's header shows its original number and the document total.
What does the downloaded .txt include?
<name>.txt is UTF-8 text with a '--- Page N of M ---' header per selected page and blank lines between paragraphs. 'Copy all text' puts the same text on your clipboard.