Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What are some of the most popular tools for automatically cleaning up HTML code to its cleanest and most best practices rendition?

The only one I know is the venerable HTMLtidy.

Please see this for examples of best practices.

share|improve this question

Depends, there are several options and depending on your coding IDE. For example, Sublime Text has some really nice built-in coding cleaner and can be extended by a gazillion of plugins for probably every coding language out there.

Of course, there are several other cleaning tools out there, but honestly, I have yet to find one which brings clean results out of the box, since lots of coders out there don't quite follow the standards to the dot.

share|improve this answer

If you mean automatically cleaning up your own HTML code, Dreamweaver has commands to apply formatting and clean up XHTML code, along with a W3C validation check.

Speaking of which, that uses the WC3 Markup and Validation Service, which allows for validation of a URI, uploaded file, and copy/pasting HTML code. The WC3 HTML Tidy Service will also cleanup your HTML.

Komodo Edit IDE has a number of formatting options and extensions (add-ons) that format and cleanup HTML, JS, CSS...and numerous other languages.

If you meant an automated script, there are a number of scripts and modules written for tidyp, like the popular Perl module HTML::Tidy

Here's a comparison of HTML Parsers, with HTML Tidy likely being the most popular, and used by the online WC3 HTML Tidy Service.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.