textscrubr
Home / Blog / Text tools

How to Remove HTML Tags From Text

Text tools2 min readUpdated 2026-06-24
To remove HTML tags from text, paste it into a cleaner that strips the markup and keeps the readable content, or use a regex like <[^>]+> to delete tags in an editor. Cleaning also removes the invisible characters and messy styling that copied HTML usually brings along.

Copied or exported content often arrives full of HTML tags, angle brackets wrapping your actual words. Here is how to strip the markup and keep the text.

Where HTML tags come from

You get raw HTML when you:

The result is your text buried in tags like <p>, <div>, <span>, and inline styles, which you do not want in a plain document.

Method 1: a cleaner

Paste the content into a cleaner that understands structure. A good one strips the tag soup, keeps the readable text, and preserves the meaningful structure (turning <ul><li> into a real list, for example) rather than leaving raw markup. textscrubr sanitizes pasted HTML this way: it removes the messy span-and-style clutter that Word, web pages, and email tools bring along, keeps the real structure, and cleans the invisible characters at the same time.

Method 2: regex in an editor

For a quick strip in a regex-capable editor:

  1. Search for <[^>]+> (any HTML tag).
  2. Replace with nothing.

This deletes the tags and leaves the text. Two cautions:

Method 3: paste into a plain-text field

Pasting HTML into a plain text editor sometimes shows the tags as literal text rather than rendering them, which lets you see and remove them. This is fiddly for large content, so a cleaner is usually faster.

Keep structure or go fully plain?

Decide what you want:

A cleaner gives you both options and handles the entity decoding and hidden-character removal that regex alone misses.

Scrub this text in one click

textscrubr strips the hidden characters, em dashes, and double spaces, and keeps your lists, headings, and code exactly where you put them. Free, and it runs entirely in your browser.

Clean my text free →

Frequently asked questions

How do I remove HTML tags from text?

Paste it into a cleaner that strips the markup and keeps the readable content, or use the regex <[^>]+> in an editor to delete tags. A cleaner also decodes entities and removes hidden characters.

Does removing HTML tags with regex work well?

It removes the tags but also flattens meaningful structure like lists, and it does not decode entities like &amp; or &nbsp;. A cleaner handles those and keeps real structure intact.

Can I keep lists and headings when removing HTML?

Yes, with a cleaner that converts real HTML lists and headings into clean equivalents instead of stripping everything to a wall of text.