Strip HTML Tags Online - Free HTML to Text

Strip HTML Tags

Remove HTML tags and decode entities to get clean plain text.

Use this tool to strip HTML tags from a snippet or a full page and get clean plain text in one click. Paste your markup, choose whether to keep line breaks, show links as text [url] and collapse extra spaces, then copy the result. It is free and needs no sign-in.

What Does It Mean to Strip HTML Tags?

Stripping HTML tags means deleting the markup browsers read, such as <p>, <strong> and <a>, so only the text people actually see stays behind. Tags tell a browser how to display content. They carry no meaning once the words move into an email, a spreadsheet cell or a plain text field.

Good tag removal does more than delete angle brackets. It also decodes entities, the codes that stand in for characters, such as &amp; for an ampersand, &nbsp; for a non-breaking space and &#169; for the copyright sign. And it drops content that was never meant to be read, such as script and style blocks. This tool removes the tags, turns entities into real characters, and discards everything inside script, style and noscript elements.

How to Use the Strip HTML Tags Tool

You can convert HTML to plain text in a few clicks, and the options match what you see on the page.

  1. Paste your markup into the HTML Input box. A short snippet, a block copied from page source or a complete document all work.
  2. Leave Keep paragraph / line breaks ticked if you want paragraphs, headings, list items and table rows on separate lines. Untick it for one continuous run of text.
  3. Tick Preserve links as text [url] when you want each link's address printed after its anchor text.
  4. Keep Collapse extra spaces ticked to squeeze repeated spaces and tabs into a single space.
  5. Click Strip Tags. The Plain Text panel appears with the result, plus a counter such as "86 chars in → 28 chars out".
  6. Click Copy to put the text on your clipboard, or Clear to empty both boxes and start again.

If you click Strip Tags with an empty box, the tool tells you to paste some HTML first.

Worked Example: From Marked-Up Sentence to Plain Text

Here is a realistic input, the same sentence the tool shows as its placeholder:

<p>Hello <strong>world</strong>! Visit <a href="https://example.com">our site</a>.</p>

With the default settings, the output is Hello world! Visit our site. The counter reads 86 chars in and 28 chars out, because the paragraph, bold and link tags are gone and only the words remain.

Now tick Preserve links as text [url] and run it again. The output becomes Hello world! Visit our site [https://example.com]. and the counter shows 50 characters out. You keep the destination of the link, which is handy when the plain text version will be read in an email or a document where nobody can click.

A list example

Paste <ul><li>Apples</li><li>Pears</li></ul> with line breaks on and you get two lines: Apples, then Pears. Turn line breaks off and the items run together as ApplesPears. That difference is the most common surprise, so check this setting first when output looks wrong.

How Do You Read and Use the Results?

The result is plain text in the Plain Text panel, and each option changes it in a predictable way.

OptionDefaultEffect
Keep paragraph / line breaksOnStarts a new line after blocks and br tags
Preserve links as text [url]OffAdds the href after the link text
Collapse extra spacesOnReduces repeated spaces and tabs to one

Line breaks

With breaks on, paragraphs, divs, list items, headings and table rows each end with a newline, and br tags become line breaks. Three or more blank lines in a row are reduced to a single blank line, so the text stays tidy. Use this setting for articles, emails and anything a human will read.

Links

Only links that have an address are rewritten, in the form anchor text followed by the address in square brackets. A link with no href simply keeps its text. Leave this option off when you only want the words, for example when counting words or writing a meta description.

Spaces and the character counter

Collapsing spaces removes the odd gaps left by indented source code. The counter compares input length with output length. A big drop means heavy markup was removed. A tiny drop means the input was mostly text already, or the tags were written as escaped text (more on that below).

When Should You Use an HTML Tag Remover?

Use it any time markup is getting in the way of the words. These are the situations where it saves the most time:

  • Cleaning CMS or editor content. Copy the source of a post and get a clean draft for a newsletter, social post or plain text email.
  • Spreadsheets. If a cell holds HTML from an export, paste it in, copy the plain text and paste it back. This is a quick answer to how to remove HTML tags from text in Excel without writing a formula.
  • SEO checks. Strip a page's body to see the visible copy, then draft a title or description from it, or check how much real text sits behind the markup.
  • Developer testing. If you are writing code to strip HTML tags from a string in JavaScript, PHP, Python or C#, run a sample through this page to see the output you should expect, then compare it with your own function.
  • Notes and documents. Remove tags from text you copied from page source when you do not want to hand-edit it in a text editor.

If you need to keep structure rather than lose it, try the HTML to Markdown converter instead, which turns headings and lists into readable Markdown.

Best Practices, Common Mistakes and Troubleshooting

Most odd results come from one of a handful of causes, and each has a quick fix.

Words are stuck together

This happens when Keep paragraph / line breaks is off, or when the source uses elements that do not add a newline, such as table cells or spans. Cells in the same row are joined without a separator, while each row ends with a new line. If you need cells separated, add a space or comma to the source first, or tidy the result by hand.

You still see angle brackets in the output

If the input contains escaped markup such as &lt;b&gt;, it is not a tag. It is text that displays as a bracketed tag, so decoding turns it into literal characters. Run the output through the tool a second time to remove them. To go the other direction and turn raw symbols into safe entities, use the HTML encoder. To decode entities without removing tags, use the HTML decoder.

Text you expected is missing

Anything inside script, style or noscript is deleted completely, and comments are not included. If the missing text sat inside one of those elements, it was removed on purpose. Image alt text and attribute values such as title are also left out, because they are not visible text content.

Messy input

If the source is minified into one long line and you want to inspect it first, the HTML formatter makes it readable. For the opposite job, shrinking markup before publishing, see the HTML minifier.

Quick habits that help

  • Strip a small sample first to confirm your settings, then paste the full document.
  • Keep line breaks on for anything people will read and off for single-line fields.
  • Turn on link preservation only when the addresses matter.
  • Read the counter. If the output is not noticeably shorter, check whether your tags were escaped.

Limitations and Accuracy Notes

This tool extracts visible text; it does not judge whether your markup is valid or safe. Broken or unclosed tags are handled the way a web browser would handle them, which usually works well but can produce surprises on badly damaged input.

List items come out as separate lines without bullet or number markers, and headings come out as ordinary lines with no styling. Text that a page adds later with scripts will not appear, because only the markup you paste is read. Plain text output is also not a substitute for properly sanitizing user input before you publish it somewhere. The tool works on pasted text only, so copy the source first if your HTML lives in a file.

When you need clean words without the markup, paste your HTML into the box above, pick your options and click Strip Tags. For more utilities like this one, browse the Web Developer Tools collection.

Frequently Asked Questions

How do I strip HTML tags from text?
Paste your HTML into the HTML Input box and click Strip Tags. The Plain Text panel shows the result, ready to copy. The tool is free and needs no sign-in, and a counter shows characters in versus characters out.
How can I remove HTML tags but keep the links?
Tick Preserve links as text [url] before clicking Strip Tags. Each link then appears as its anchor text followed by the address in square brackets, for example our site [https://example.com]. Links without an address keep only their text.
Does the tool decode HTML entities like and &?
Yes. Entities are converted into the characters they represent, so an ampersand code becomes a plain ampersand. Text that was escaped as a literal tag, such as a written-out bold tag, is decoded into brackets, so run the output again to remove it.
Why are the words in my output running together?
Words run together when Keep paragraph / line breaks is unticked, or when the source uses table cells or inline elements with no space between them. Tick the option first. If cells still join, add a space or comma in the source.
How do I remove HTML tags from text in Excel?
Copy the cell contents, paste them into the HTML Input box, click Strip Tags, then copy the Plain Text result and paste it back into the cell. This works for a few cells at a time and costs nothing.
Does Strip HTML Tags remove script and style content too?
Yes. Everything inside script, style and noscript elements is deleted, not just the tags, so JavaScript code and CSS rules do not show up in your plain text. Comments are not included in the output either.
Recommended

Explore VPN options

A VPN changes your network exit. It does not guarantee anonymity.

Hide Your IP Encryption Network coverage
Protect My IP Now