HTML tag remover

Strip HTML tags to get clean plain text.

Text copied out of a web page or a CMS editor often arrives wrapped in markup — stray <p> tags, <span style="..."> fragments, &nbsp; where a space should be. Deleting them one at a time is tedious, and a careless find-and-replace tends to eat part of the content. Paste the source here and only the readable text comes back.

How it works

How the stripping works

The input is parsed by the browser's own HTML engine and the text content is read back out. That matters: unlike a regular expression that deletes anything between < and >, a real parser handles nested tags, attributes containing angle brackets, and malformed markup without cutting into your content.

HTML entities are decoded at the same time, so &amp; becomes &, &nbsp; becomes a space, and &lt; becomes <.

The tidy option

Tidy blank lines & spaces is on by default. With it enabled the output also gets:

  • runs of spaces and tabs collapsed to a single space
  • three or more stacked blank lines reduced to one
  • leading and trailing whitespace trimmed

Turn it off if you need the original indentation and line spacing preserved, for example when the text is code or pre-formatted output.

How to use it

  1. Paste markup into the upper box — the result updates as you type.
  2. Adjust the tidy checkbox and press Strip tags if you want to re-run it.
  3. Press Copy result to take the plain text.

What to expect

Text inside <script> and <style> blocks is not part of the readable content and does not appear in the output. Neither do image alt attributes, link URLs or any other attribute value — only what a reader would see on the page survives. Layout is lost as well: tables, lists and headings all flatten into plain lines, so a complex page comes back as an unstructured block.

Terms explained

HTML tag
A markup element such as <p> or <span> that describes structure or styling rather than being readable content.
HTML entity
A code standing in for a character, like &nbsp; for a space or &amp; for an ampersand. These are decoded back to the real character.
Plain text
Content with no markup — just characters and line breaks.
Parser
The component that reads markup as a document rather than as a string of characters, which is what makes nested and broken tags safe to handle.
Attribute
A value inside a tag, such as href or alt. Attributes are not readable content and are dropped along with the tag.

Frequently asked questions

Why is some text missing from the result?

Content inside <script> and <style> blocks is treated as code rather than readable text and is removed with the tags. Text that lives only in attributes — image alt text, link URLs, title tooltips — is also dropped, because attributes are part of the markup and not part of what a reader sees.

Will the formatting be preserved?

No. Headings, bold text, lists and tables all become plain lines, because the output is text with no markup at all. If you need to keep structure, convert to Markdown instead of stripping tags.

Is this safe to run on untrusted HTML?

The markup is parsed in a detached element and only its text is read out, so it is not inserted into the visible page. Even so, treat unknown source as unknown source and review the output before pasting it somewhere else.

Should I leave the tidy option on?

Leave it on for prose, where collapsed spacing is almost always what you want. Turn it off when whitespace carries meaning — code samples, pre-formatted blocks, or anything where indentation matters.

Does the text get sent to a server?

No. The parsing happens entirely in your browser, so nothing is uploaded and nothing is stored. Refreshing the page clears both boxes.