About the Strip HTML Tags
A regular expression like /<[^>]*>/g fails on comments, > inside attributes and script contents. This tool uses the browser's HTML parser (DOMParser), the same one that renders web pages, and then walks the resulting tree. The parsed document is inert and never inserted into this page, so scripts do not run and images do not load.
Block elements such as <p>, headings, list items, table rows and <div> end a line, paragraphs and headings are separated by a blank line, and <br> becomes a line break. Table cells are separated by tabs. Content of <script>, <style>, <head> and <template> is dropped. Entities are decoded, so — becomes — and & becomes &.
Keep links appends the URL after the link text, e.g. search index (https://example.com/search), which is useful for plain-text emails. Collapse extra whitespace behaves like a browser: runs of spaces become one, except inside <pre>.
How to use it
- Paste HTML or open an .html file.
- Choose whether to keep line breaks and link URLs.
- Copy the plain text or download it.