Remove inline styles
Walk the parse tree and drop every `style="…"` attribute and `<style>` block; nested quotes or `content:"a>b"` inside attribute values are safe, and the result reports how many inline styles and blocks were removed, with an optional echo of the block bodies.
Runs in your browserEvery computation happens in your browser — your data never leaves this device.
Result
The result can be copied directly.
Paste HTML to see the style-free markup
Characters: 0 · Lines: 0 · Inline styles: 0 · Blocks removed: 0
What this tool does
- Strip both external and inline styles to get structural HTML for another system.
- Count how many inline styles a piece of rich text really contains.
- Keep the style blocks and clear only inline styles to debug style overrides.
Example
Input
<p style="color:red">a</p><style>p{color:blue}</style>Output
<p>a</p>
Only the `style` attribute and `<style>` blocks are removed; other tags and attributes stay.
Frequently asked questions
Does it remove `class` too?
No. Only the `style` attribute and `<style>` blocks are dropped; `class`, `id` and the rest stay.
Can a value like `content:"a>b"` break it?
No. Deletion happens on the parse tree by attribute name, so `>` and nested quotes inside values do not matter.
What is the difference between keeping and echoing blocks?
Keeping leaves `<style>…</style>` in the output; echoing appends the removed bodies so you can review them first.
Can I remove only some inline styles?
No. The current policy removes all inline styles; partial selector-based removal is out of scope.
Keywords:html-style-removeremove stylesdeveloper