PDF to Text — Free Online Text Extractor
Pull the text out of a digital or scanned PDF, right in your browser. Free, no sign-up and the PDF never leaves your device.
Want to thank us? Tell your friends about LeanImg!
How to Convert a PDF to Text
Choose your PDF
Drop the file into the box or pick it from your device. Digital PDFs, scanned PDFs and files that mix the two all work.
Pick a language and extract
Choose the language of the document, then start the extraction. Pages with a text layer are read straight away. Pages that need OCR are recognized one after another, with progress shown as each one lands.
Copy or download the text
Read the result, copy it to your clipboard or save it as a .txt file with the pages labeled.
How PDF to text extraction works
A PDF is a container, and what sits inside it decides how the text comes out. A file exported from a word processor, a browser or an accounting app carries a text layer. The characters are stored as characters, along with their position on the page. Reading that layer gives you the text exactly as the file stores it. No recognition step runs, so there is nothing to get wrong.
A scanned PDF is a different thing wearing the same file extension. A scanner or a phone camera produced a picture of each page, and the picture was wrapped in a PDF. There are no characters in the file, only pixels that look like characters to a human eye. Getting words out of it needs OCR, which renders the page and matches shapes against a trained model for the language you pick.
The extractor checks every page before it decides. If the page has a usable text layer, that layer is read and the result is exact. If it does not, the page is rendered as an image and sent through the same OCR engine that powers the image extractor. Files that mix the two get both treatments, one page at a time, and the summary on the result says which method each page used. Every file is read up to 25 pages per PDF.
Bank statements, IDs and contracts stay on your device
The documents people most want to pull text out of are the ones they should be least willing to upload. Bank statements, payslips, tax forms, signed contracts, medical letters and scans of a passport or an ID card. Every one of those is a file you would not email to a stranger, and handing it to a website you found in a search result is the same act with fewer steps.
This extractor has no upload endpoint. Your PDF is read from disk into the page, opened by a PDF reader running in your browser and turned into text in memory. The requests the page makes are for its own machinery: the reader itself and, when a page needs OCR, the recognition engine and the language model. All of them are served from this site, and they only travel toward you.
You do not have to take that on faith. Open your browser's network tab before you start a run, then watch it while the text appears. You will see the machinery arriving and nothing carrying your document away. That is a claim you can check in under a minute, which is more than a privacy policy gives you.
What this tool does not do
This page goes one direction only. It reads a PDF and gives you plain text. It does not write a PDF. It does not hand back a searchable PDF with a text layer added. It does not rebuild your document as a word processor file with the original layout intact. What you get is the words.
It does not merge, split, rotate, compress or password protect anything either. There are sites for all of that, and most of them need your file on their server to do the work. That is the trade this page is built to avoid.
If you want to go the other way and turn photos or scans into a single PDF, the JPG to PDF converter on this site does that. It runs in the browser exactly the way this page does. If your source is a screenshot or a photograph rather than a PDF, the image extractor is the page you want.
Why LeanImg?
The PDF is read on your device, page by page, and the text stays there with it. Explore all of our free image tools to keep the rest of your workflow in the browser too.
Nothing Uploads
Bank statements, IDs and contracts are exactly the files you should not send to a stranger's server. This tool has no server to send them to.
Exact Where It Can Be
Digital PDFs are read from their text layer verbatim. Only scanned pages go through OCR, and each result says which method was used.
Free and Unlimited
No sign-up, no credits, no watermarks and no paid tier. Up to 25 pages per PDF, as many PDFs as you need.
What the numbers look like
Four PDFs went through this extractor with their text known in advance. The score is a character by character comparison of the output against that text. Three of the files were born digital, exported straight from a browser, so the characters were already sitting inside them. The scanned one was made by pushing a screenshot through this site's own JPG to PDF converter, which leaves a picture of a page and no characters at all. The last row is a 28-page file. It was built to trip the page cap, so none of it was scored for accuracy.
| Fixture | Pages | Method | Similarity |
|---|---|---|---|
| Born-digital PDF | 1 of 1 | Text layer | 100.0% |
| Scanned PDF | 1 of 1 | OCR | 100.0% |
| Three-page digital PDF | 3 of 3 | Text layer | 100.0% |
| Oversize PDF | 25 of 28 | Text layer | Not scored |
Two methods produced those rows, and the file decides which one runs. Every page is checked for a text layer first, and when the characters are there they are read out verbatim with no recognition step at all. That is where the word exact belongs, and nowhere else on this page. A page with no usable text layer is rendered as an image and handed to the same OCR engine that reads screenshots, so it carries that engine's accuracy and its failure modes. Files that mix the two get both treatments, one page at a time.
The result tells you which happened. A PDF read entirely from its text layer is labeled exact, and the card carries no confidence score for it. Any document with an OCR page in it shows a score. A document of more than one page also carries a line counting the pages read from the text layer against the pages that went through OCR. That score is a character-weighted average across the whole document, and text-layer pages enter it at 100. On a mixed file, read it as how much of the text is trustworthy, not as how well OCR did. The per-page summary line is what tells you how many pages were recognized at all.
What downloads on first use
Both engines run on your machine, so they have to get there first. Opening a PDF fetches the pdf.js worker, which is about 1.3 MB. The OCR engine and one language model come down with it, about 6 MB together, and they come down even when every page turns out to be digital and no recognition ever runs. That is a wasted download on a born-digital file. It is a current limitation and fixing it is on the list.
Everything is served from this site and none of it from a third-party CDN. Your browser caches all of it, so the next PDF in that language starts with nothing to fetch. Documents built with unusual fonts pull one more small file for the character maps, and only those documents do. Nothing travels the other way. Your PDF is read from disk into the page and opened in memory, and no request carries it out.
Where the limits are
One PDF gets 25 pages. The oversize fixture holds 28 of them, and the run took the first 25 and said so on the result card. A longer document still gives you something, and the way through is to split the file in a PDF reader and send the remaining pages as a second run.
A password protected PDF is refused. It cannot be opened without its password, and this page will not ask you for one. The extractor says exactly that and stops. Open the file in the reader you already use, save a copy with the password removed and run that copy.
Reading order is the quieter limit. A text layer records where each run of characters sits on the page and nothing about what any of it means, so columns, sidebars and footnotes can come back in an order your eye would never take. Tables lose the grid and arrive as their cell contents in sequence. Straight prose is nearly always fine. A filled form or a two-column page is worth reading before you rely on it.
Handwriting in a scan sits outside this engine. It is trained on printed characters, and a handwritten line comes back as noise shaped like text. A scan that mixes print with handwriting gives you the printed part and nonsense in place of the writing.
One more boundary worth knowing: a scan that was already OCRed by other software carries that software's invisible text layer, and this tool reads it verbatim. The result is exact to the file, not necessarily to the paper it was scanned from.
Frequently Asked Questions
What is the difference between a digital PDF and a scanned PDF?
A digital PDF was produced by software, so it carries the characters themselves. A scanned PDF is a stack of page images produced by a scanner or a camera, so it carries no characters at all. That difference decides everything about the result. The digital file gives you exact text. The scanned file has to be recognized, and recognition is very good on clean scans and less good on crooked, blurry or badly lit ones. You can usually tell which kind you have by opening the file in a PDF reader and trying to select a line of text with your mouse. If the selection highlights words, there is a text layer.
Is the extracted text exact for digital PDFs?
For pages with a real text layer, yes. The characters are read out of the file rather than recognized from a picture, so no OCR runs on them and there is nothing to misread. Reading order is the one thing that can still surprise you, because the text layer stores where each run of characters sits rather than what it means, so a page with columns or sidebars may come out in an order that does not match the way your eye moves. The words themselves are the words in the file. Pages with no text layer go through OCR instead, and those carry the usual recognition accuracy.
How many pages can I extract at once?
Up to 25 pages per PDF. A longer file is still accepted: the first 25 pages are extracted and a notice on the result tells you how many pages were left out. The cap is there because the work runs on your own hardware, and a long scanned document means one OCR pass per page inside your browser tab. If you need the rest, split the file in a PDF reader and run the remaining pages as a second file.
Can I extract text from a password protected PDF?
No. An encrypted PDF cannot be opened without its password, and this page does not ask you for one or try to get around the protection. You get a clear error instead of a blank result. Open the file in the reader you normally use, authenticate the way you normally do, save a copy with the password removed and run that copy through here.
Does my PDF get uploaded to a server?
No. The file is read from your disk into the page and opened by a PDF reader that runs in your browser. There is no upload endpoint in this site to receive it. That is the whole point for the documents people actually bring to a tool like this: bank statements, payslips, tax forms, signed contracts and scans of an ID. Watch the network tab during a run and you will see the reader and the OCR model arriving, and nothing leaving with your document.
Which languages can it read?
The OCR side reads English, Spanish, Romanian, Arabic, Greek, Turkish, Indonesian, Russian and Japanese. Pick the language before you extract, because the engine matches shapes against the model you choose and the wrong model reads badly. Pages that already have a text layer ignore the setting completely, since those characters are read out of the file as they are, whatever script they are written in.
Can I extract text from several PDFs at once?
Yes. Select a batch and the files are worked through in sequence rather than in parallel. Each result appears as soon as its file is finished, so you can start reading while the rest are still running. The dropzone shows the limit for a single run. Sequential processing keeps memory use predictable, which matters most on a phone.
Does it keep tables and layout?
No. The output is plain text, so a table comes back as its cell contents rather than a grid, and headers, footnotes and captions are not marked as anything. Reading order can also differ from the visual layout, because position is what the file stores and meaning is not. Straight prose comes through in the right order nearly always. A page with sidebars, several columns or a filled form is where you should read the output before you rely on it.
Can it read handwriting in a scanned PDF?
No, and we would rather say so here than let you find out with a file that matters. The OCR engine is trained on printed characters. Handwriting, signatures and handwritten form fields sit outside what it can do, and what comes back from them is noise shaped like text. A scanned page that mixes print with handwriting gives you the printed part and nonsense where the writing is.
What format is the extracted text in?
Plain text. Copy it to your clipboard with one button or download it as a .txt file, with the pages separated and labeled so you can find your place in a long document. There is no word processor file, no searchable PDF and no formatting carried over. If you need the words somewhere else, paste them into a document, a spreadsheet or a translator.
How do I turn images into a PDF instead?
That is the other direction, and it has its own page on this site. The JPG to PDF converter takes photos or scans and writes them into a single PDF, in your browser, with nothing uploaded. Use it when you have pictures and need a document. Use this page when you have a document and need the words out of it.
Is the PDF to text converter really free?
Yes, free with no account and no usage counter. There is no sign-up, no watermark on the text, no credits and no paid tier holding back a better version. The extraction runs on your own hardware, so there is no per-file server cost for us to pass on to you.
Working with pictures instead? Extract text from images reads screenshots, scans and photos of documents. Going the other way? Turn images into a PDF with the JPG to PDF converter.