HTML Cleaner
Strips the junk office editors leave behind: Word service tags, inline styles, classes, empty tags and non-breaking spaces.
A preset turns on the checkboxes below. You can flip any of them by hand.
Your code stays in the browser: nothing goes to the server.
Clean code
Text copied from Word or Google Docs brings its service markup with it: tags like <o:p>, MsoNormal classes, inline styles on every paragraph, conditional comments. None of this improves the layout, while the page weight grows three to four times.
Lists are a separate problem. Word does not output them as lists but as a chain of paragraphs, and it puts the bullet character right into the text. On a site, such a list loses both indentation and numbering, and a dot stays hanging before each item.
What gets removed
- Word service markup: tags with a colon, o: and v: attributes, conditional comments, bullet characters;
- inline styles, classes, identifiers, data attributes;
- empty tags, including those containing only a non-breaking space;
- obsolete tags: <font>, <center>, <strike> along with presentational attributes like align and bgcolor;
- links, images, and tables when you only need the text.
Paragraph items left over from Word are assembled back into <ul> or <ol>; the list type is determined by the bullet character.
Tags <script>, onclick handlers, and javascript: links are removed regardless of the checkboxes. People usually clean someone else's code before putting it on their own site, and the active part of it is not needed there.
Rate this tool
Help us get better
Tell us what was missing.
Other tools
HTML Special Characters
487 characters in twelve sections, with click-to-copy.
Visual HTML Editor
Type as in a text editor and get ready-made HTML.
HTML Color Codes
Color codes in HEX, RGB, HSL and HSB, with a contrast check
Glassmorphism CSS Generator
Frosted glass with a text readability check and a fallback
CSS to SCSS
Flat CSS becomes SCSS with nesting, and back, verified against your source.
CSS Grid Generator
A grid for three screens, with ready HTML and a block-order check
CSS Gradient Generator
Gradients without a gray middle, with a text readability check
Box Shadow Generator
Layered shadows, previewed on two backgrounds with a visibility check