Skip to content
UniKit

HTML tag stripper (selected tags)

Keep the text between tags and optionally strip only the named ones: `<p>a < b</p>` yields `a < b` because a bare `<` is text; script blocks are kept by default and only lose their content when drop-scripts is on. The result lists both removed and kept tags.

Runs in your browserEvery computation happens in your browser — your data never leaves this device.

HTML source

Result

The result can be copied directly.

Paste HTML to see the stripped text

Characters: 0 · Lines: 0 · Tags removed: 0

What this tool does

  • Clean only a few tags and keep the rest of the structure.
  • Confirm whether script blocks lose their content or only their tags.
  • Audit removed and kept tags when turning rich text into plain text.

Example

Input

<p>a < b</p><span>x</span>

Output

a < bx

A bare `<` is text; script/style keep their content unless drop-content is checked.

Frequently asked questions

What does `<p>a < b</p>` produce?

`a < b`. The bare `<` is text; a tag only starts when `<` is followed by a letter or a slash.

How are script/style handled by default?

Only their tags are dropped and the content stays, so you can still see the script source; check the drop-content switch to remove the block as well.

What are removed and kept?

`removed` lists the tags the current settings strip and `kept` lists the tags still present, so you can verify the rules.

How is it different from html-strip?

They overlap and share the same tokenizer; this one additionally reports the kept tags, while html-strip has a more general input surface and an entity-decoding switch.

Keywords:strip-tagstrip tagsdeveloper

Related tools