Convert to External CSS: Removes the inline styles, adds a class to each element, and inserts a <link rel="stylesheet" href="style.css"> tag at the end of the <head>. The rules are shown in the CSS box, ready to copy or download. For example, the input
<button style="background-color: #3498db; color: white;">Save</button>
becomes
<button class="class-1">Save</button>
with the rule below saved in style.css and the link tag added inside the <head>:
.class-1 {
background-color: #3498db;
color: white;
}
Convert to Internal CSS: Puts the same rules into a <style> tag in the <head>. If your HTML already has a <style> tag, the new rules are added to it instead of creating a second one. Because the rules live inside the output HTML, the separate CSS box is hidden and you can simply copy or download the HTML.
One-click conversion: Click the "Convert CSS Code" button to move every inline style into internal or external CSS. Loading an example or uploading a file runs the conversion automatically, and switching between the External and Internal options updates the output and CSS box right away.
Smart class reuse: Elements with equivalent styles - even when the spacing or the declaration order differs - share a single class, so you never get duplicate rules. Two elements with style="margin: 0;" both become class="class-1".
Custom class prefix and file name: Set your own prefix (default "class") to get names like btn-1, and your own file name (default "style.css") for the external stylesheet. Generated names never clash with classes already used in your HTML.
Safe CSS parsing: Declarations are split correctly even when values contain semicolons inside url(...) data URIs, quoted strings or comments, so no rule is ever broken or lost.
Clean output: Empty style="" attributes are removed, existing classes are left untouched, and the <!DOCTYPE> plus any comments above the <html> tag are preserved.
Upload and convert in one step: Load a .html, .htm or .txt file and the tool converts it immediately, then copy or download the output HTML and the CSS file.