Remove HTML Tags
Strip HTML tags from text.
About this tool
Paste HTML and press Run to delete the tags, leaving the text between them. It is a quick strip, not a full HTML parser.
How to use
How it works
HTML comments and anything that looks like a tag (< followed by a letter or /, up to the next >) are removed; a stray < followed by a space, as in 1 < 2, is left alone. The text inside script and style elements stays because only the tags around it are deleted, and entities such as & or are left as written.
Worked example
A snippet with a script
- Input
- <p>Hello <b>world</b> & <script>alert(1)</script>bye</p>
- Output
- Hello world & alert(1)bye
- Walkthrough
- All tags disappear. The entity & and the script body alert(1) are kept.
Limitations
- Does not remove the contents of script or style tags.
- Does not decode HTML entities.
- A < directly followed by a letter, such as a<b, is read as the start of a tag.
Questions
How do I strip HTML tags from text?
Why do I still see &?
Will it remove JavaScript?
Features
- Deletes anything in < >
- Fast plain-text strip
- Runs in your browser
Related resources
Guides and videos from around the web—opens on YouTube or the publisher’s site.
HTML Crash Course For Absolute Beginners
Traversy Media
Text on the web often starts as HTML you clean or count.
Watch on YouTubeCSS Flexbox Crash Course
freeCodeCamp.org
Case and spacing tools show up constantly in front-end copy.
Watch on YouTube
- Unicode Normalization Forms
Unicode
Why seemingly identical characters break equality checks.
- Accessibility
MDN
Readable text and case choices matter for inclusive copy.