How to Extract Text from a PDF or Image: OCR, Languages and Pages
Pages that already hold text are read directly, and only pages that are pictures go through OCR. Here is how to add files, read what each run did, set OCR, languages and pages, keep only the text in the languages you want, correct it and save it.
Tools used in this guide
Extract Text from PDF & Images
Extract readable text from PDFs, scanned documents, and images. Copy, search, or download your extracted text.
Scan Document
Scan pages with your camera or import photos, then save them as one PDF.
Unlock PDF
Remove supported printing, copying, and editing restrictions from PDFs you own or have permission to modify.
1. Add your files
Extract Text opens on a drop area. Drag PDFs or images onto it, or use Choose files at marker 1.
- Choose files. Pick PDFs or images from your device, or drop them anywhere on this area. Up to 20 files can be open at once, 300 MB in all.
- Supported formats. PDF, JPG, PNG, WebP, TIFF, GIF, BMP and AVIF. A PDF's own text is read directly; a picture, or a page that is only a picture, is recognized with OCR.
Up to 20 files can be open at once, 300 MB in all. A PDF can be 100 MB and 1,500 pages, an image 50 MB, a TIFF 100 MB or 500 pages, and one run covers up to 3,000 pages. A single file over a limit is turned away with a note of which limit it passed, and several at once get one notice that asks you to check size and file count; the others are added. A page-count limit shows once the file is open: it fails with a note of how many pages it has.
The formats at marker 2 are PDF, JPG, PNG, WebP, TIFF, GIF, BMP and AVIF. A TIFF with several frames is read frame by frame, each one a page. A PDF locked with a password gets its own card, This PDF is password-protected, with a field and Open PDF or Skip this file. The password stays in this tab’s memory and is never stored or sent. To save an unprotected copy of the PDF itself, use Unlock PDF.
Everything is read in the tab you already have open, and nothing is uploaded. The first picture you read downloads the recognition engine and the language file from this site, a few megabytes, and your browser keeps them for next time.
To follow along without a file of your own, Don’t have a PDF? Try a sample PDF loads a three-page file: a page with a heading and paragraphs, a page in two columns and a last page that is only a picture. It is the file in the screenshots below, except for the two in step 4 and the last one, which use files of their own.
2. Read the result
A file is read as soon as it is added, and its text appears in the card when it is done.
- Where the text came from. Embedded text was already in the PDF, Recognized (OCR) was read from a picture and Embedded and recognized is both. Typing in the box makes it Edited.
- The text. From two pages up, each page starts with a line like --- Page 2 ---. Click in the box to correct it: Copy and Download take what is on screen.
- What was read. Words, lines and pages, the pages that have text when some don't, and how many pages OCR recognized: here 1 of the 3.
The line at marker 1 says where the text came from. Embedded text was already in the PDF, Recognized (OCR) was read from a picture, and Embedded and recognized, as in the figure, is both. Typing in the box changes it to Edited.
The box at marker 2 holds the text page by page, in reading order. Once two or more pages are in the text, each one begins with a line like --- Page 2 ---, which is only there to help you find your place: a Word file drops it for a real page break. Paragraphs are separated by blank lines, and a wide gap between table cells becomes a tab.
The figures at marker 3 count what was read: words, lines and pages, the pages that have text when some don’t, and how many pages OCR recognized.
OCR reads only the pages that need it. A page with a usable text layer is read directly, so nothing is read twice and nothing is mistyped. A page with no text, or with too little or too garbled a layer to use, is drawn and recognized instead. In the sample that is the last page, and the counts say 1 recognized. OCR works on one page at a time on your device, and a page that can’t be read is named in a line with Try those pages again.
When more than 25 pages need OCR, the tool asks first. Start OCR reads them, and Not now finishes with the text that is already in the file. Stop (it reads Cancel until recognition starts) ends a run, keeps the pages that are done and offers Continue.
3. Choose OCR, languages and pages
On a laptop Settings is the column beside the text. On a phone it is a row above the card that says what is set and opens with a tap.
- OCR Mode. On, OCR reads the pages that have no usable text: here 1 of 3. Off, a scan stays empty and a line says so. A photo is always recognized.
- Languages in your files. Up to three of nine. They tell OCR what a scan is written in, so choose the ones your file uses: the wrong one gives garbled text.
- Only these languages. Off until you choose a language. On, only text in the chosen languages is kept, whether it was embedded or recognized (step 4).
- Pages. All, Odd, Even or a typed Range like 1-3, 5. It shows while a single PDF with more than one page is open.
OCR Mode, at marker 1, is on unless your browser asked to save data. With it on, pages without usable text are recognized. With it off, a scan stays empty: a line under the switch counts the pages that have no selectable text. A PDF that has some text shows a line above it saying OCR is off, with Turn on OCR beside it, and a file with no text at all gets the No text found card, which says it looks like a scan and offers Turn on OCR. A photo is always recognized, so when only images are open the switch reads Always on for images. If this browser can’t run OCR at all, it reads Not available in this browser, and the text that is already in a PDF is still extracted.
Languages in your files, at marker 2, tell OCR what a scan is written in. There are nine: English, German, Portuguese, French, Spanish, Arabic, Hindi, Malayalam and Tamil, and up to three can be chosen at once. The tool can’t work out a language by itself, so choose the ones your document uses: the wrong one gives garbled text. On the English page English is chosen; on the German page German and English are, and likewise for Portuguese, Spanish and Hindi with English. At least one language always stays chosen.
Only these languages, at marker 3, is the next step.
Pages, at marker 4, is All, Odd, Even or a Range typed like 1-3, 5. It shows only while a single PDF with more than one page is open. With several files every page of each is read, and a line says page selection is off.
A change to a setting doesn’t change a text that was already made. When the settings differ from the ones the text was made with, Settings gets a dot and Extract again appears: press it to apply them. If you have typed in the box you are asked first, because extracting again replaces the text, edits included. Settings belong to the document you have open, one set for all its files. New File, or removing the last file, starts the next document with the defaults again, and nothing is remembered between visits.
4. Keep only the languages you want
The chips tell OCR what to expect, but they don’t touch text that is already in a PDF: a file with paragraphs in three languages comes out in three languages whatever you choose. Only these languages is what narrows it, and it applies to embedded and recognized text alike. The figures here use a one-page file with an English, a German and an Arabic paragraph.
- Languages. Arabic is chosen and the rest are off. At least one language always stays chosen, and at most three can be.
- Only these languages. The first chip you press turns it on by itself. Switch it off and extract again to get all the text back.
- Extract again. Appears, with a dot on Settings, because the text was made with other settings. Press it to apply them: pages already read are reused.
Press the chips for the languages you want, at marker 1. The first press turns Only these languages on by itself, at marker 2. Then take off the languages you don’t want, so that Arabic is the only one left. The text was made with other settings now, so Extract again, at marker 3, appears.
- Settings summary. Says what is set while Settings is closed: OCR on, and Arabic only.
- Only the Arabic. The English heading and the English and German paragraphs are gone and the Arabic one is left. Switch the filter off and extract again to bring them back.
- Still embedded text. The page was read directly: the filter works on whatever text was found, whether it was embedded or recognized.
After Extract again, the summary at marker 4 reads OCR on · Arabic only, and the box at marker 5 holds the one paragraph in Arabic: the English heading and the English and German paragraphs are gone. The line at marker 6 still says 1 page · Embedded text, because the page was read directly: the filter works on whatever text was found. Switch Only these languages off, press Extract again, and all the text is back; the pages already read aren’t read from the file a second time.
The filter works one paragraph at a time. A paragraph in Arabic, Hindi, Malayalam, Tamil or another non-Latin script is told by its script, and an English, German, Portuguese, French or Spanish one by the words it uses. While you keep a language written in Latin letters, whatever in Latin letters the filter can’t place stays: a page number, a name, a short label, or a language outside the five, such as Italian. When you keep only languages in other scripts, as with Arabic here, everything in Latin letters goes, and digits and punctuation stay. A short heading goes with the paragraph that follows it. When nothing in the chosen languages is left, the card says so, No text in Arabic was found. Choose other languages, or turn off Only these languages., with Change language beside it.
5. Find and correct the text
- Find in text. Matches are shaded and the current one is stronger. Enter goes to the next match, Shift+Enter to the previous one and the × clears the search.
- Matches. The count, and the buttons that step through the matches. Searching never changes the text.
Type a word in Find in text, at marker 1: the matches are shaded in the text and the current one is stronger. The count at marker 2 reads 1 of 7, and the arrows, or Enter and Shift+Enter in the field, go to the next and the previous match. The × clears the search, and searching never changes the text.
The box is a real text box. Click in it and correct a word, and the line under the file name changes to Edited. Restore original text appears beside the search field and asks before it puts the extracted text back. What you copy or download is what is on screen, edits included. A text of more than 500,000 characters can be read but not edited, and past 8,000,000 characters it isn’t shown at all, though Copy and Download still include all of it.
6. Copy or download
- Copy Text. Puts all the text on your clipboard, as it is in the box. If the browser blocks it, the text is selected so you can copy it yourself.
- Download .txt. Saves a plain text file named after yours, with -extracted added. The line above the buttons says what was saved.
- More download options. For one file: Word (.docx), with a paragraph for each block of text and a new page where each page began.
- New File. Opens the file picker. What you choose replaces everything that is open, and the settings start again from their defaults.
Copy Text, at marker 1, puts all the text on your clipboard. If the browser blocks it, the text is selected instead, so you can copy it yourself.
Download .txt, at marker 2, saves a plain UTF-8 text file named after yours with -extracted added, pdf-head-extract-text-sample-extracted.txt for the sample. The line above the buttons names what was saved.
The button at marker 3 opens the other formats. For one file that is Word (.docx): a paragraph for each block of text, a new Word page where each page began, and none of the original’s design.
New File, at marker 4, opens the file picker. What you choose replaces everything that is open, and typed-in changes that haven’t been copied or downloaded are asked about first.
7. Several files
Add files appends more files under the current settings, up to the limits in step 1. Each file gets its own tab with a mark for where it stands, and an All files tab joins them.
- All files. One tab for each file, and this one for all of them. Add files appends under the current settings, up to 20 files in all and 3,000 pages in each run.
- Every text, in order. Each file's text follows its own name between === lines, so you can tell where one ends and the next begins.
- Download ZIP. One .txt file for each file, in extracted-text.zip. On a single file's tab the button saves that file as a .txt.
- Other formats. Combined text (.txt) puts every file in one text file. Word (.docx) puts them in one Word file, each file starting a new page.
The head at marker 1 counts the files and their pages. The text at marker 2 holds every file’s text one after the other, each under its own name between === lines. The main button at marker 3 is Download ZIP: one .txt file for each file, in extracted-text.zip. Its menu, at marker 4, offers Combined text (.txt), every file in one text file, and Word (.docx), every file in one Word file with each file on a new page. On a single file’s tab the button saves that file as a .txt, and the menu also offers the ZIP and the combined text. A file with no text is left out of the ZIP, the combined text and the combined Word file.
Which output for which job
| You want… | Do this |
|---|---|
| The text in an email or a note | Copy Text |
| A plain text file of one file | Download .txt |
| Something to edit in Word | Word (.docx) in the menu |
| One text file for each file | Download ZIP on the All files tab |
| Every file in one text | Combined text (.txt) in the menu |
| Only the text in one language | Only these languages, then Extract again |
| The words on a photo or a scan | Add the picture itself: it is always recognized |
Access and technical limits
Pro ($9.99/month) is required to download text, Word files and ZIPs of your own files, and includes unlimited exports. Technical limits such as browser memory still apply, along with the limits in step 1: up to 20 files and 300 MB at once, PDFs of up to 100 MB and 1,500 pages, images of up to 50 MB and 60 megapixels (30 on phones and tablets), and 3,000 pages in one run.
Which tool you want
- Read the text in PDFs, scans and photos → Extract Text, as above.
- Turn paper into a clean scanned PDF first → Scan Document; How to scan a document to PDF walks through it.
- Make one PDF from photos → Image to PDF; How to convert images to a PDF walks through it.
- Save pages as pictures → PDF to Images; How to convert a PDF to images walks through it.
- Keep an unprotected copy of a locked PDF → Unlock PDF.
- A PDF whose text won’t copy, or that won’t open → PDF troubleshooting.
Common questions
Why does my file say Embedded and recognized?
OCR only reads pages that have no usable text. A page with a text layer is read directly, which is exact and fast, so it is never recognized as well. In the sample the last page is a picture, so the card reads Embedded and recognized and the counts say 1 recognized. A page whose text layer is empty, too short or garbled is recognized too.
Why did choosing a language not change the text I already had?
The chips tell OCR what a scan is written in, and OCR doesn't read a PDF's own text, so a chip alone doesn't change that text. Only these languages is what narrows it, and the first chip you press turns it on. A change that would alter the text waits for Extract again: the dot on Settings and the button show it. A file is read by itself as soon as it is added, with the settings in force: the defaults for the first file of a document.
Why is a line in another language still there with Only these languages on?
The filter judges one paragraph at a time and removes only what it can tell is in another language. While you keep a language written in Latin letters, a page number, a name or a short heading it can't place stays, or goes with the paragraph after it, and so does a Latin-alphabet language outside the five, such as Italian. Switch the filter off and extract again to compare.
Why did the tool ask before reading my long scan?
More than 25 pages that need OCR can take minutes on a phone, so the tool says how many and waits. Start OCR reads them, and Not now finishes with the text that is already in the file, with a line counting the pages left and a Start OCR button for them. Stop ends a run and keeps the pages that are done.
Why do the Pages choices disappear when I add a second file?
Page selection is for one PDF with more than one page. With several files every page of each file is read, and a line under Settings says page selection is off. Remove files until a single PDF with more than one page is left to bring the choices back.
What happens to my edits when I press Extract again, Restore original text or New File?
Extracting again replaces the text, edits included, so it asks first whenever you have edited it, even if you have copied or downloaded it since; its sheet ends in Extract again, and Restore original text asks the same way and ends in Restore text. New File replaces everything that is open and asks only about edits you haven't copied or downloaded; its sheet ends in Discard edits. On every sheet Keep working leaves everything as it was.
Does Extract Text remember the languages I chose?
No. Settings belong to the document you have open, one set for all its files: New File, or removing the last file, starts the next document with the defaults again, and nothing is saved between visits. The next document never starts from the last one's languages or from a switch you turned off.