Strip HTML Tags

Removes HTML markup and returns the readable text, decoding entities and keeping paragraph breaks. Script and style contents are discarded rather than left behind as stray code, which is where most simple tag strippers fall down.

Live demo · real result from this tool

Plain text

Release notes Version 2.0 is out & ready. • Faster• Smaller

Processed on your device — nothing is uploaded.

How to use Strip HTML Tags

  1. Paste your HTML.
  2. The plain text appears immediately, with paragraphs separated.
  3. Copy the result.
  4. Script, style and comment contents are removed entirely, not just their tags.
  5. Block-level elements become line breaks so paragraphs and list items stay separate.
  6. Processing runs in your browser — email content and drafts are not transmitted.

Why removing only the tags is not enough

A naive stripper deletes anything between angle brackets, which leaves the contents of script and style elements sitting in the output — so pasting a web page gives you its JavaScript and CSS mixed into the prose. This tool removes those elements whole, along with HTML comments, before stripping the remaining tags. It also converts block-level closing tags to line breaks, because otherwise every paragraph and list item runs into the next as one wall of text.

Entities are decoded after the tags go

Escaped markup in the source — <b> written as text rather than as a tag — should survive as visible text, so entities are decoded last. Doing it the other way round would turn that escaped example into a real tag and then strip it, silently losing content. The same order matters for &, which must be decoded after the others or it re-creates entities that have already been resolved.

What it is useful for

Getting the text out of an HTML email or a newsletter. Recovering copy from an exported page when the original document is gone. Counting the real words in a piece of formatted content. Cleaning a rich-text paste before putting it into a plain-text field. Preparing content for a search index or a text analysis tool that would otherwise count markup as words.

For rendering rather than reading, this is the wrong tool

Stripping tags is a way to read text, not a way to make untrusted HTML safe to display. If you are taking user-submitted HTML and putting it back into a page, you need a sanitiser that keeps the safe markup and removes the dangerous parts — DOMPurify is the standard answer. Stripping everything and re-inserting is both lossy and, done carelessly, still unsafe.

Frequently asked questions

Does it decode HTML entities?
Yes — common entities like &amp;, <, >, ", ' and are converted back to their characters.
Will it keep the text content of tags?
Yes — only the tags themselves are removed; the visible text between them is preserved.
Is it safe for untrusted HTML?
The tool strips tags for display only and never executes any script, so pasted markup is treated purely as text.
Why did my output contain JavaScript before?
Because a simple tag stripper removes the <script> tags and leaves everything between them. This tool removes those elements whole, along with <style> blocks and HTML comments, so only readable text comes through.
Does it keep paragraph breaks?
Yes. Closing block-level tags and <br> become line breaks, so paragraphs, headings and list items stay on separate lines rather than running together.
Can I use this to sanitise user input for my website?
No — different job. Stripping tags gives you plain text; safely displaying user-submitted HTML means keeping the harmless markup and removing the rest, which needs a real sanitiser such as DOMPurify.

Written by the ToolsRift team · Last updated

Pages are drafted with AI assistance and checked by automated tests. How we write and check pages.

Was this tool useful?

Report a problem

Start typing to search every tool.

↑ ↓ to moveEnter to openEsc to close