Strip HTML tags and keep the text
This HTML stripper lets you strip HTML tags from a page or snippet and keep only the human-readable text. It removes scripts and styles along with their content, turns block elements into line breaks and decodes entities, so the result reads like the rendered page rather than a jumble of tag fragments.
Example
<article>
<h1>Release notes</h1>
<p>Version <b>2.0</b> is out — faster & smaller.</p>
<script>track()</script>
<ul><li>New API</li><li>Bug fixes</li></ul>
</article>
Release notes
Version 2.0 is out — faster & smaller.
New API
Bug fixes
What happens, step by step
- HTML comments are removed.
script,style,noscriptandtemplateelements are removed together with their contents, so no JavaScript or CSS leaks into the text.<br>becomes a line break, as do the closing tags of paragraphs, headings, list items, table rows, divs, sections, blockquotes and similar blocks.- All remaining tags are removed. Inline tags such as
b,aandspandisappear and leave their text behind. - Entities are decoded: every numeric entity (
€→ €,😀→ 😀) and common named ones such as&,<, ,©and—. Less common names such as♥are left as written. - Runs of spaces are collapsed and more than one blank line in a row is reduced to one.
What you lose
Attributes are discarded, including link URLs, image alt text and titles. <a href="https://example.com">docs</a> becomes just "docs", and images vanish. Table cells in the same row are joined without a space, so for tabular data use HTML table to CSV instead.
Edge cases
The stripper uses pattern matching rather than a full browser parser. A bare < in text, as in if a < b and c > d, looks like the start of a tag and the text between the two brackets is removed. Correct HTML writes that character as <, which is handled fine.
Because entities are decoded, the output can contain real angle brackets: <script> becomes <script>. Treat the result as plain text and never insert it into a page as HTML. This tool is not an HTML sanitizer.
HTML stripper vs. related tools
To only decode entities while keeping the tags, use HTML decode. The HTML to text converter is an alternative for whole documents, and the text cleaner can strip tags as one step of a larger clean-up.
Privacy
The processing runs entirely in your browser. The text you enter is not uploaded to a server.