Remove HTML Tags

Paste HTML markup and this tool strips out every tag, leaving just the text that sat between them. It runs the standard PHP strip_tags routine: anything inside angle brackets (<p>, <br>, <div class="...">, closing tags and <!-- comments -->) is removed, and the surrounding text is kept exactly as it was. You also get three counters: characters before, characters after, and how many were removed.

How it works

  1. 1

    Paste the markup

    A snippet of HTML, a full page copied from View Source, or an HTML email body.

  2. 2

    Remove the tags

    Press the button and every tag, closing tag and HTML comment is removed in one server-side pass.

  3. 3

    Read the counters

    The stats show the character count before and after, plus how many characters were removed.

  4. 4

    Copy the plain text

    The output is a clean string ready for a text editor, spreadsheet, AI prompt or further processing.

What it does, and what it does not

strip_tags is a fast, literal tag remover. It is not a full HTML-to-text converter, so it helps to know exactly where the line is.

  • Tags are removed, text is kept. <b>bold</b> text becomes bold text. Opening tags, closing tags and their attributes all disappear.
  • HTML comments are removed. <!-- note -->visible becomes visible.
  • No line breaks are inserted. Block tags such as <p> and <div> are simply deleted, so <p>One</p><p>Two</p> becomes OneTwo. Line breaks that already exist in your text are kept.
  • Entities are not decoded. Tom &amp; Jerry stays Tom &amp; Jerry. To turn &amp; back into &, run the result through an HTML entity decoder.
  • Script and style text stays. Only the <script> and <style> tags are removed; the code or CSS between them remains. Delete those blocks yourself first if you do not want them.

Before and after

Input Output
<p>Hello</p> Hello
<a href="https://x.com">click</a> click
<b>bold</b> text bold text
<!-- note -->visible visible
<br><br> (empty)
Tom &amp; Jerry Tom &amp; Jerry

Common uses

  • Cleaning CMS output. Pull the body text out of an exported article and save it as plain .txt.
  • Feeding language models. Models work better with plain text than with markup, so strip the tags before you prompt.
  • Scraped-data cleanup. When a scraper hands back innerHTML but you only wanted the visible text.
  • Quick text extraction. Drop in any HTML fragment and read back the words without the markup around them.

Good to know

  • Where it runs. The stripping happens on our server. Only the before and after character counts are recorded for analytics, never the HTML itself, but as with any online tool, avoid pasting genuinely sensitive data.
  • Entities and scripts. If the output still shows &amp; or leftover JavaScript, that is expected: decode entities separately and remove <script> / <style> blocks before pasting.

Frequently Asked Questions

No. It only removes tags, so entities such as &amp;, &nbsp; and &#39; pass through literally. Run the result through an HTML entity decoder if you need the real characters.

No. Block tags like <p> and <div> are deleted without inserting a newline, so paragraphs can run together. Any line breaks already present in your text are preserved.

The tags themselves are removed, but the JavaScript or CSS text between them stays in the output. Delete those blocks before pasting if you do not want the code.

Yes. <!-- ... --> blocks are stripped out along with the tags.

On our server, through a single strip_tags pass. The tool records only the before and after character counts, not your HTML content.

Related Tools

Tool available in other languages