FormatterHQ

HTML Stripper

Strip HTML tags from any markup and keep only the readable text, with scripts removed, entities decoded and paragraphs kept on separate lines.

Input HTML
Output TEXT
Ready.

How to use the HTML Stripper

  1. Paste the HTML markup or snippet.
  2. Let the tool strip the tags and decode the entities.
  3. Check the plain text, especially around tables and inline code.
  4. Copy the text.

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 &mdash; faster &amp; 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

  1. HTML comments are removed.
  2. script, style, noscript and template elements are removed together with their contents, so no JavaScript or CSS leaks into the text.
  3. <br> becomes a line break, as do the closing tags of paragraphs, headings, list items, table rows, divs, sections, blockquotes and similar blocks.
  4. All remaining tags are removed. Inline tags such as b, a and span disappear and leave their text behind.
  5. Entities are decoded: every numeric entity (&#8364; → €, &#x1F600; → 😀) and common named ones such as &amp;, &lt;, &nbsp;, &copy; and &mdash;. Less common names such as &hearts; are left as written.
  6. 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 &lt;, which is handled fine.

Because entities are decoded, the output can contain real angle brackets: &lt;script&gt; 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.

Frequently asked questions

Does the HTML stripper remove JavaScript and CSS?
Yes. Script, style, noscript and template elements are removed together with everything inside them, so code does not appear in the plain text.
Are HTML entities like &amp; and &nbsp; converted?
Yes. All numeric entities and the common named ones are decoded into real characters. Rare named entities that the tool does not know are left unchanged.
Why did some of my text disappear?
A literal < character in the text, such as in a comparison, is read as the start of a tag, and everything up to the next > is removed. Encode it as &lt; in the source HTML to keep it.
Are links and image alt text kept?
No. Only text content survives; attributes such as href, src, alt and title are removed with the tags.
Is the output safe to insert into a web page?
Not as HTML. Decoding entities can turn the escaped text &lt;script&gt; into a real <script> tag, so always insert the result as plain text or escape it again first.

Last updated September 26, 2026

Related tools

BBCode to HTML Converter Convert forum BBCode such as [b], [url], [quote], [list] and [code] into clean, safe HTML markup instantly. CSV to HTML Table Converter Convert CSV to HTML online for free. Get clean table markup with a live preview. Excel to HTML Table Converter Convert Excel to HTML online for free. Get clean table markup with a live preview. HTML Color Names All 148 CSS and HTML colour names with HEX, RGB and HSL values. Search, switch between grid and table, and copy with a click. HTML Decode Decode HTML entities such as &amp;amp;, &amp;eacute; and &amp;#8364; back into the characters they represent. Online HTML Editor Write and edit HTML with autocompletion and a sandboxed live preview, then copy or download the finished document. Invisible Character Detector & Remover Find zero-width spaces, non-breaking spaces, BOMs, bidi overrides and other hidden Unicode characters — then remove or escape them. Letter Randomizer Scramble the letters inside words or across the whole text — great for word puzzles and anagrams. Multiline to Single Line Join multiple lines into one line with a space, comma or custom separator, optionally quoting each item. NATO Phonetic Alphabet Translator Spell out text with the NATO phonetic alphabet (Alfa, Bravo, Charlie…) or turn code words back into text. Handles digits and symbols. Number Sorter Sort a list of numbers numerically in ascending or descending order, with optional de-duplication. Paragraph Counter Count paragraphs in any text (blocks separated by blank lines) plus words, sentences and characters.