Remove HTML Attributes

Please log in or register to do it.

This tool removes HTML attributes from your input HTML text according to the selected mode. You can remove all attributes entirely, remove only specific attributes, or remove all except those you explicitly allow. Use the checklist below to select attributes for modes 2 and 3.

Processing Modes:


Strips every attribute from all HTML tags.

Removes only the attributes you select; all other attributes remain.

Keeps only the attributes you select; all other attributes are removed.

Select HTML Attributes:

Examples:

Remove All HTML Attributes

Strips every attribute from all HTML tags.

Before:
<p class="intro" id="p1">Hello <strong style="color:red;">World</strong></p>
After:
<p>Hello <strong>World</strong></p>

Remove Only Specific HTML Attributes

For example, if you select "class" and "id" in the checklist, only those attributes are removed.

Before:
<p class="intro" id="p1">Hello <em class="highlight">World</em></p>
After (removing class and id):
<p>Hello <em class="highlight">World</em></p>

Remove All Except Allowed HTML Attributes

For example, if you allow only "href", all other attributes are removed.

Before:
<a href="https://example.com" class="btn" target="_blank">Visit</a>
After (allowing only href):
<a href="https://example.com">Visit</a>
Remove HTML Comments
Remove HTML Tags

Your email address will not be published. Required fields are marked *