DirtyMarkup: HTML Beautifier

DirtyMarkup is the web's premier HTML beautifier. Used by millions of users around the world, our site and API has formatted HTML, CSS, and Javascript across nearly a billion lines of code.

Clean

Indent with Tabs 2 spaces 3 spaces 4 spaces 8 spaces

Preferred line length None 80 100 120 140 160 180 200

Output Full page Code fragment

Indent Auto Block-level None

Brace style With control statement With control statement (preserve inline) On own line End on own line

Add empty lines for clarity

Allow proprietary attributes

Optimize for MS Word HTML

Newline between rules

Newline between selectors

Add spaces in parenthesis

Break chained methods

Commas at beginning of line

Keep array indentation

Preserve empty lines