Strip HTML Tags
Remove HTML tags from markup and keep the text, with entities decoded, scripts and styles removed and paragraph breaks preserved.
Free · No sign-up · Your inputs stay in your browser
Input
Strip HTML tags and keep the text
Output
Plain text
0 characters
Entities are decoded (& becomes &) and script and style contents are removed rather than kept as text, which is the usual bug in a regex-based strip_tags. The HTML is parsed into an inert document, so nothing in it runs.
Runs in this browser. Nothing you paste is sent to a server.
About this tool
Method, assumptions, practical next steps, and limits.
Why a regex is not enough
Replacing <[^>]+> with nothing leaves the contents of script and style tags in the text, glues words together where block elements met, and leaves entities encoded. PHP's strip_tags() has the same problems with scripts. Parsing the HTML first, as browsers do, avoids all three.
Stripping is not sanitising
Plain text from this tool is safe to display because it contains no markup. If you need to keep some formatting from untrusted HTML, use a sanitiser with an allow-list instead, such as DOMPurify in the browser or HTML Purifier and Symfony's HtmlSanitizer in PHP; removing tags you can think of is how XSS filters get bypassed.