Skip to the content

Strip HTML Tags

Paste HTML and get the plain text: tags removed, entities such as & decoded, paragraphs and list items on lines of their own.

Spaces and line breaks
Characters
Characters before
0
Characters after
0
Removed
0
Share this tool:TwitterFacebookLinkedInWhatsAppEmail

What comes out

Before
<h2>Opening hours</h2> <p>Mon&ndash;Fri: 9&nbsp;am to 6&nbsp;pm<br> Sat: 10 am to 4 pm</p> <ul> <li>Free parking</li> <li>Caf&eacute; &amp; shop</li> </ul> <script>track("visit")</script>
After
Opening hours Mon–Fri: 9 am to 6 pm Sat: 10 am to 4 pm Free parking Café & shop

The markup is read the way a browser reads it, and then only the text is kept.

  • Tags disappear. <b>, <span>, <a> and the like leave their text behind. The address of a link is dropped.
  • Blocks become lines. Paragraphs get an empty line between them. Headings, list items, table rows and <br> start a new line, and the cells of a table row are separated by a tab.
  • Entities are decoded. &amp; becomes &, &eacute; becomes é and &#8364; becomes €. A no-break space (&nbsp;) stays a no-break space until you tick Remove invisible characters.
  • Scripts and style sheets are left out, not shown as text.
  • The line breaks and indentation of the source are ignored when the markup has paragraphs, list items or <br> of its own, exactly as on a web page. Text that merely has a few tags in it, such as subtitles with <i>, keeps its lines.

Nothing in the pasted markup is run or loaded. It is parsed into a separate document that never appears on the page, so a script in it does nothing and an image in it is not fetched.

A < that is not part of a tag, as in 3 < 5, is left alone. Something like a<b does look like the start of a tag to an HTML parser, and the text right after it can go missing. Check the result if your text has angle brackets that are not markup.

All fourteen clean-ups, to combine as you like, are on the Text Cleaner page, which also remembers what you ticked.

See all 9