How to Extract Text from a Website or Webpage (5 Ways)
Summary: Five ways to get the text off a webpage, from plain copy and paste to a free webpage to text tool, plus what to do with text inside images and how to stay within a site's rules.
To extract text from a website, select and copy it for short passages, use your browser's reader mode for articles, or paste the URL into a free webpage to text tool for a quick plain-text version. Text inside images needs OCR, since it isn't really text at all.
Which one is best depends on how much text you need and how the page is built. Here's how the five methods compare.
| Method | Best for | Main drawback |
|---|---|---|
| Copy and paste | A sentence or a paragraph | Picks up formatting and clutter |
| Reader mode | Articles and blog posts | Not offered on every page |
| Webpage to text tool | A whole page as plain text | Can't run JavaScript or log in |
| Save as text | Keeping a file on your computer | Depends on your browser |
| OCR on a screenshot | Text inside images | Characters can be misread |
Why plain copy and paste often disappoints
Selecting a whole page and copying it usually brings along much more than you wanted: menus, sidebars, cookie notices and "related article" links. Pasting into a word processor may also carry over fonts, colors and links.
Some of that is easy to fix. When you paste, look for Paste as plain text or a similar option in your app's menu, which drops the formatting and keeps the words. Copying section by section also helps, because you avoid the menus and sidebars altogether.
If that's more clean-up than you'd like, one of the next methods will suit you better.
Method 1: Copy and paste carefully
This is still the right answer for short passages.
- Click just before the first word, then hold Shift and click just after the last word. This is more accurate than dragging across a long passage.
- Press Ctrl+C (Cmd+C on a Mac).
- Paste into your document, using the plain text option if your app has one.
Some sites prevent selection, and that may be a deliberate choice by the publisher. See the section on copyright and site terms below before you work around it.
Method 2: Use reader mode
Reader mode reformats an article into a simple page with the clutter removed. Copying from there is much cleaner, and you can use it even if you just want an easier read.
- Chrome: Google's instructions are to right-click the page and select Open in reading mode. The shortcut is Alt+Shift+R on Windows, Linux and ChromeOS, or Cmd+Option+R on a Mac.
- Safari on a Mac: click the Page menu button in the Smart Search field, then choose Show Reader. Apple notes that the button appears only when the page has an article Reader can show.
- Firefox: Reader View also removes page clutter to improve readability.
Reader mode works best on articles. It may not be offered, or may not make much difference, on product listings, forums and app-like pages.
Method 3: Use a webpage to text tool
Our Webpage to Text tool gives you a page's text without copying anything by hand.
- Open the tool. It's also available as the Webpage tab on our other tools.
- Paste the full address of a public page.
- Select Extract.
- Edit the text if you need to, then copy it or download it as .txt, .docx, .xlsx, .pdf, .html or .md.
Our server fetches the page, removes the HTML tags, scripts and styles, and returns what's left as plain text. Line breaks follow the page's paragraphs, headings, list items and table rows, so the result stays readable, but links and images aren't included. You should know how it behaves, so a blank or cluttered result doesn't surprise you:
- Menus and footers can remain. The tool removes code rather than judging which words matter, so navigation labels and footer text may appear at the start and end of your result. They're quick to delete.
- It doesn't run JavaScript. If a page loads its content with scripts after opening, the tool sees only the initial HTML, and the result may be nearly empty. Use reader mode or copy and paste instead.
- It can't log in. Pages behind a login or a paywall aren't available to it.
- It doesn't follow redirects. If a link fails, open it in your browser and paste the final address from the address bar.
- It has limits. It stops if a page takes more than 10 seconds or is over 5 MB, and it counts toward the limits of 10 extractions an hour and 30 server requests a day.
Method 4: Save the page as a text file
Some browsers can save a page as text directly. In Firefox, Mozilla's documentation describes opening the menu, choosing Save Page As, and picking Text Files from the Save as type list. You can then open the result in any text editor. The file won't keep the page's links.
Browsers don't all offer this option, so if yours doesn't, save the text another way: use one of the other methods and paste the result into a text editor.
Method 5: Get text from images on a page
Copy tools and our webpage tool can only find real text. Words inside a banner, an infographic or a screenshot are pixels, so they won't appear.
- Save the image, or take a screenshot of it.
- Upload it to our Image to Text tool.
- Check the result. Fancy fonts and text over busy backgrounds are the most likely to be misread.
Images up to 5 MB are accepted. Clear ones are read in your browser. When the on-device OCR isn't confident, the image goes to Google's Gemini API for a second attempt. If you're on a phone, our article on extracting text from an image on iPhone and Android covers the tools built into your device.
If a page won't cooperate
| What you see | Likely reason | What to try |
|---|---|---|
| The tool returns almost nothing | The content is loaded by JavaScript | Reader mode, or copy and paste |
| The tool says extraction failed | A redirect, a timeout, or the site blocked the request | Use the final URL, or copy and paste |
| The text stops partway | The page loads more as you scroll | Scroll to the end first, then copy |
| Text is missing from your copy | It's inside an image | Use OCR on a screenshot |
| Reader mode isn't offered | The browser didn't detect an article | Try the webpage tool |
Respect copyright and site terms
Being able to extract text doesn't give you the right to reuse it. Web content is generally protected by copyright, and many sites set out in their terms what you may do with it.
Some reasonable habits:
- Keep it personal or quote it properly. Saving an article to read later is very different from republishing it. If you quote, credit and link to the source.
- Read the terms for anything larger. Commercial use, and collecting content across many pages, often comes with specific rules. Check the site's terms and its robots.txt file.
- Don't try to get around access controls. If a page is behind a login or paywall, or a publisher has clearly restricted copying, respect that or ask for permission.
- Be careful with personal data. Pages can contain other people's information, and privacy rules may apply to collecting it.
This isn't legal advice. For a commercial project, ask a lawyer who knows your country's rules.