HTML Tools
Strip HTML Tags
Remove all or selected HTML tags from a snippet or full document. Specify tags to keep (e.g. p, a, strong) and all others are stripped. Optionally decode HTML entities in the output. Shows the number of tags removed and characters saved.
Leave empty to strip all tags.
About the HTML Tag Stripper
Remove all HTML tags from a document, or keep a whitelist of tags you want to preserve. Optionally decode HTML entities at the same time. Useful for cleaning CMS-generated content, preparing text for plain-text emails, or sanitising user input before storage.
The tag whitelist strips all other tags but leaves the allowed ones intact — for example, keeping b, i, a will preserve bold, italic and links while removing everything else.
Frequently asked questions
How do I keep specific tags?
Enter a comma-separated list of tag names in the "Keep tags" field — for example: p, a, strong, em. Those tags remain in the output; all others are removed.
Is this safe to use for sanitising user input?
This tool runs entirely in your browser and is a quick utility for formatting tasks. For production security sanitisation, use a server-side library with a strict allowlist — never rely on a client-side tool for security-critical input sanitisation.