Remove HTML tags from text

Remove HTML tags from text by stripping every match of <...> while leaving the readable copy in place. Optional toggles convert <br> tags to line breaks before stripping and collapse runs of whitespace left behind by removed tags. The transform runs in your browser, so paste a chunk of HTML or rich-copied content and read the plain text on the right. For the full HTML-to-Markdown conversion, see html to markdown.

Input
Line 1:1 LF cloud_done Saved locally
Result Strip HTML Tags
0 lines 0 chars

How tag stripping works

The core regex is /<[^>]*>/g: every angle-bracketed run is removed in one pass. That covers opening tags (<p>), closing tags (</p>), self-closing tags (<br/>), tags with attributes (<a href="#">), and HTML comments (<!-- ... -->). Text content between tags is left in place verbatim.

Flip BR to Newline on to convert every <br> or <br/> tag into a line break before the stripping pass. Without it, <br> just disappears like any other tag, which often glues two visual lines into one. With it on, the line structure of the original HTML survives the strip.

Flip Collapse WS on to clean up runs of spaces and tabs left behind by removed tags. This pass collapses inner space runs to a single space and trims spaces and tabs adjacent to line breaks, producing a tidy plain-text result. Note that this is a regex strip, not a parser. For pages with malformed markup or script blocks, use extract text from html for a more thorough extraction.

How to use remove html tags from text

  1. 1Paste HTML into the input panel on the left.
  2. 2Read the plain-text result on the right with all tags removed.
  3. 3Turn on BR to Newline if line breaks should survive the strip.
  4. 4Turn on Collapse WS to tidy up extra spaces left by removed tags.
  5. 5Click Copy to take the cleaned plain text.

Keyboard shortcuts

Drive TextResult without touching the mouse.

Shortcut Action
Ctrl FOpen the find & replace panel inside the input Plus
Ctrl ZUndo the last input change
Ctrl Shift ZRedo
Ctrl Shift EnterToggle fullscreen focus on the editor Plus
EscClose find & replace, or exit fullscreen
Ctrl KOpen the command palette to jump to any tool Plus
Ctrl SSave current workflow draft Plus
Ctrl PRun a saved workflow Plus

What this tool actually does

Strips every angle-bracketed tag

A single regex match removes opening, closing, and self-closing tags, attributes and all. <p>, </p>, <a href="...">, and even HTML comments <!-- ... --> are removed in the same pass.

BR to newline preserves line structure

The BR to Newline toggle replaces every <br> or <br/> with \n before the stripping pass. With it off, <br> is removed like any other tag, often gluing two visual rows together.

Optional whitespace tidy-up

Flip Collapse WS on to collapse runs of spaces or tabs to a single space and trim spaces or tabs adjacent to newlines. This step runs after tag removal, so it cleans up the gaps that disappearing tags leave behind.

Entities pass through unchanged

HTML entities such as &amp;, &nbsp;, and &#39; are not decoded. To turn entities back into characters, follow up with html decode. Pair the two when you want raw text from copied HTML.

Regex strip, not a DOM parse

The pass uses a single regular expression, fast for clean markup but blind to malformed input. Unbalanced angle brackets in plain text (such as 5 < 7) can be partially eaten. For tougher inputs, use extract text from html, which handles HTML entities and broken tags more robustly.

Worked example

With BR to Newline on, <br> becomes a line break; the other tags are stripped while their text content survives.

Input
<p>Hello <strong>world</strong>!</p><br><a href="#">Link</a>
Output
Hello world!
Link

Settings reference

Setting or behaviour Effect on output
BR to Newline toggle (off) When on, every <br> tag is replaced by \n before stripping.
Collapse WS toggle (off) When on, runs of spaces or tabs collapse to one, and spaces or tabs adjacent to newlines are trimmed.
Tag stripping Always on. Every <...> match is removed including attributes and comments.
HTML entities (&amp;, &nbsp;, &#39;) Pass through. Use html decode afterwards to convert them.
Script and style content The opening and closing tags are stripped, but the inner JavaScript or CSS text is left in place. Remove it manually before pasting if you want it gone.
Line endings LF stays LF, CRLF stays CRLF. The input status bar shows which is detected.

FAQ

Will it decode HTML entities like &amp; or &nbsp;?
No. This tool only strips tags. Entities pass through verbatim. To convert &amp; back to &amp; or &nbsp; back to a space, run the result through html decode as a follow-up step.
Why does my text run together after stripping?
When <br> or block-level tags are removed without replacement, two visual rows become one line. Turn on BR to Newline so <br> is converted to \n before stripping. The line structure of the original HTML then survives.
Does it remove script or style content too?
It removes the <script> and <style> tags, but the JavaScript or CSS text between them stays in the output. If your input contains script blocks, delete them manually before pasting, or use extract text from html, which handles them more thoroughly.
What about malformed HTML?
The regex is fast but not a parser. Plain text with stray < or > may be partially eaten if it looks like a tag. For ill-formed input or content where you cannot trust the markup, use extract text from html.
Is it safe to paste sensitive HTML?
Yes. The strip runs in your browser as a regex replacement. The HTML you paste never leaves the page, no copy is logged, and no network request fires while the transform runs.