About the HTML Tag Remover
Stripping tags with a regular expression goes wrong the first time an attribute contains an angle bracket or a comment wraps half a document. This remover parses the markup properly and then unwraps elements, so the text inside a deleted tag is preserved and never eaten along with it. Three modes cover the usual jobs. Remove every tag flattens the document to prose. Keep only these tags is the whitelist a comment field or a plain email needs, typically a, b, i, strong and em. Remove only these tags is the surgical option for pulling out every <span> or <font> while the rest of the structure survives.
Script, style, noscript and template contents are discarded before anything else runs, because their text is code and not content. With line breaks kept, block level elements such as paragraphs, list items, table rows and headings each end with a newline, so the flattened text still has paragraph shape instead of arriving as one run-on line. Collapsing blank lines then squeezes any run of three or more newlines down to a single empty line.
Non-breaking spaces become ordinary spaces and repeated spaces collapse, which is what makes copied web text paste cleanly into a spreadsheet or a translation tool. The status line counts the words that survived. When you want Markdown rather than flat text, HTML to Markdown keeps the headings and links as syntax.
How to use
- Paste the HTML, or drop a saved page onto the input pane.
- Pick a Mode. The Tags field is used by the two whitelist modes only.
- Copy the plain text, or download it as a
.txtfile.
Common questions
- Does removing a tag delete the text inside it?
- No. Elements are unwrapped, so their children move up into the parent and only the tag itself disappears.
- Why is script content missing from the output?
- Script, style, noscript and template blocks are dropped before stripping, since their contents are code rather than readable text.
- Can I keep nested tags such as a link inside a bold run?
- Yes. In whitelist mode the nesting is preserved as long as both tag names are in the list.
- What happens to HTML entities such as &nbsp;?
- They are decoded by the parser, so you get real characters. Non-breaking spaces are converted to ordinary spaces so the text copies cleanly.