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
- 1Paste HTML into the input panel on the left.
- 2Read the plain-text result on the right with all tags removed.
- 3Turn on BR to Newline if line breaks should survive the strip.
- 4Turn on Collapse WS to tidy up extra spaces left by removed tags.
- 5Click Copy to take the cleaned plain text.
Keyboard shortcuts
Drive TextResult without touching the mouse.
| Shortcut | Action |
|---|---|
| Ctrl F | Open the find & replace panel inside the input Plus |
| Ctrl Z | Undo the last input change |
| Ctrl Shift Z | Redo |
| Ctrl Shift Enter | Toggle fullscreen focus on the editor Plus |
| Esc | Close find & replace, or exit fullscreen |
| Ctrl K | Open the command palette to jump to any tool Plus |
| Ctrl S | Save current workflow draft Plus |
| Ctrl P | Run 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 &, , and ' 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.
<p>Hello <strong>world</strong>!</p><br><a href="#">Link</a>
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 (&, , ') |
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 & or ?
& back to & or back to a space, run the result through html decode as a follow-up step.Why does my text run together after stripping?
<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?
<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?
< 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.