This tool cleans your HTML by removing inline styles, allowing you to simplify or sanitize your markup. You can choose to completely strip out all style attributes from your elements, remove only specific CSS properties while preserving others, or selectively retain only a whitelist of allowed style declarations.
Examples:
Remove All Inline Styles
Completely removes the style attribute from every element.
Before:
<p style="color:red; font-size:16px;">Hello <strong style="font-weight:bold;">World</strong></p>
After:
<p>Hello <strong>World</strong></p>
Remove Only Specific CSS Properties
Removes only the specified properties (e.g., "color") from inline styles.
Before:
<p style="color:red; font-size:16px;">Hello <strong style="color:blue; font-weight:bold;">World</strong></p>
After (removing "color"):
<p style="font-size:16px;">Hello <strong style="font-weight:bold;">World</strong></p>
Remove Inline Styles Except Allowed Properties
Retains only the allowed CSS properties (e.g., "font-weight") in inline styles.
Before:
<p style="color:red; font-size:16px;">Hello <strong style="color:blue; font-weight:bold;">World</strong></p>
After (allowing "font-weight"):
<p>Hello <strong style="font-weight:bold;">World</strong></p>