✂️ HTML Tag Stripper
Remove HTML tags from text and keep the plain text content. Preserves line breaks from common block tags. Allowlist for tags you want to keep.
Last updated: November 8, 2026 · By the BoltQuickTools team
Pull the readable text out of HTML
Before you can count words, index content, or paste a scraped article into a document, the tags have to go. This page parses your markup with the browser's DOMParser and keeps the text. Scripts in the input do not run and images do not load during parsing, and the tool's code sends nothing anywhere.
Setting it up
Paste into HTML Input and Plain Text Output updates as you type or change an option. Strip Tags reruns it, Copy copies the result, Sample loads an example and Clear empties the page. Four boxes, all ticked by default, control the result:
- Preserve line breaks starts a new line around block elements and
br. - Decode HTML entities leaves
&as a plain&. - Collapse extra whitespace squeezes runs of spaces and trims each line.
- Drop script and style content skips those tags and
noscript.
List tag names in Keep these tags, separated by commas, to leave those in the output.
What the sample produces
The page's sample is an article with a heading, a paragraph with bold and link tags, a list, and script and style blocks. With default options the output is:
Hello & welcome
This is a sample with a link and some emphasis.
First item
Second item with extra whitespace
Adding a, strong, em to Keep these tags changes the second paragraph to:
This is a <strong>sample</strong> with <a href="https://example.com">a link</a> and some <em>emphasis</em>.
With Preserve line breaks unticked, the whole thing becomes one line: Hello & welcome This is a sample with a link and some emphasis. First item Second item with extra whitespace.
Behaviour worth knowing
- Table cells have no separator. Two adjacent cells holding
aandbcome out asab, and only rows get line breaks. The same goes for neighbouring inline tags. Convert tables another way if you need the columns. - A stray
</div>ends processing early. The page wraps your input in adiv, so an extra closing tag closes the wrapper and all the text after it is lost.<p>a</p></div><p>b</p>returns onlya. - On a full page, the text in
titleis included. - Collapsing also trims indentation inside
pre. Untick Collapse extra whitespace to keep code layout. - Unticking Decode HTML entities does not restore the original source. It re-escapes only
&,<and>, so©still becomes the symbol. It also escapes any tags you chose to keep, turning<b>into<b>, so leave it ticked when using the keep list. - Comments are always removed.
Frequently asked questions
Are kept tags safe to publish?
No. Keep these tags is a text filter and not a sanitizer. Kept tags retain all their attributes, including handlers: <b onclick="y"> stays as written. Do not use the output to clean untrusted HTML for display.
Why does a kept br or img have a closing tag?
Every kept tag is written with a matching end tag, so img becomes <img src="a"></img>. Browsers tolerate this for images, but </br> is treated as another line break. Avoid keeping br and leave it to Preserve line breaks.
What should I do with the text next?
Paste it into the word counter, or use the HTML to Markdown converter if you want to keep headings and links as structure. To only decode entities and leave tags in place, use the HTML entity tool.