pipr.tools

strip-html

Remove all HTML tags

</> Web

Try it

stdin0 chars
stdout0 chars

Example

Strip HTML tags to get plain text

Usage
$ echo "<h1>Title</h1><p>Hello <strong>world</strong></p>" | strip-html
View source
(input) => {
      const el = document.createElement("div");
      el.innerHTML = input;
      return el.textContent || el.innerText || "";
    }

Suggested Pipelines

Related Tools