Boneyard Tools

Strip HTML Tags From Text

Paste HTML or rich markup and this tool returns clean, readable plain text with every tag removed. Script and style blocks are deleted along with their contents, common entities like & are decoded back to real characters, and block tags such as paragraphs and list items can be turned into line breaks so the structure survives.

How to strip HTML tags

  1. Paste your HTML into the HTML input box, or click Load sample to try it.
  2. Leave Decode entities on to turn codes like & back into real characters.
  3. Leave Keep line breaks on to map paragraphs and lists to newlines, or uncheck it to flatten to one line.
  4. Read the Plain text output box, which updates as you type.
  5. Use Copy or Download to save the result as stripped.txt.

Examples

Strip a paragraph

<p>Hello <b>world</b></p>
Hello world

Remove a script block

<p>Visible</p><script>track();</script>
Visible

Decode entities with tags removed

Fish &amp; chips &pound;5
Fish & chips £5

Frequently asked questions

What does stripping HTML tags do?

It removes every tag such as <p>, <a> and <span> from your text and returns just the readable content. Inline tags are deleted in place, and script and style elements are removed together with everything inside them.

Does it decode HTML entities?

Yes, by default. Named entities such as &amp;, &lt;, &gt;, &quot;, &nbsp; and &pound;, plus numeric references like &#39; and hex codes, are turned back into the real characters. Uncheck Decode entities to keep them exactly as written.

Can it keep paragraphs and line breaks?

Yes. With Keep line breaks on, block tags like <br>, </p>, </div> and </li> become newlines so the plain text keeps its paragraph structure. Turn it off and every tag becomes a space instead, flattening the text onto one line.

Will it remove dangerous scripts and styles?

Yes. Complete <script> and <style> elements are removed along with everything between their opening and closing tags, so leftover JavaScript and CSS never appear in the output. It cleans text for reading, though, and is not a substitute for a security sanitizer.

What happens to a stray less-than sign?

A lone < or > that is not part of a real tag, such as in 2 < 3, is left untouched. Only valid tags, HTML comments and script or style blocks are matched and removed.

How is whitespace handled in the result?

Whitespace is tidied last. With line breaks kept, runs of spaces collapse to one, each line is trimmed, and multiple blank lines squeeze down to a single gap. With line breaks off, all whitespace collapses to single spaces and the ends are trimmed.

Can I use it on a full web page or email?

Yes. Paste the full HTML source of a page or an email and it strips the markup down to the visible text. Very long documents are handled in one pass, and the character count under the output shows the size of the result.

Does it change the words themselves?

No. Only tags, comments, script and style blocks and entity codes are touched. The letters, numbers, punctuation and casing of the actual text are left exactly as they were.

Is my text private?

Yes. Stripping runs entirely in your browser and nothing is uploaded to a server, so the HTML you paste never leaves your device.

Learn more

Related tools