Hello World\nThis is a test of the HTML Stripper.', ); const [copied, setCopied] = useState(false); const stripHtml = (html: string) => { if (typeof document === "undefined") { return html.replace(/]*>/g, ""); } // Create a new div element const temporalDivElement = document.createElement("div"); // Set the HTML content with the providen temporalDivElement.innerHTML = html; // Retrieve the text property of the element (cross-browser support) return ( temporalDivElement.textContent || temporalDivElement.innerText || "" ); }; const outputText = stripHtml(inputText); const copyToClipboard = () => { navigator.clipboard.writeText(outputText); setCopied(true); setTimeout(() => setCopied(false), 2000); }; return ( HTML Stripper

Remove all HTML tags from a block of text, leaving only plain text behind.

Input HTML

Plain Text

Infinio Tools
Beautifully built with daisyUI 🌼