Great Tools to Clean Up or Minify your HTML Code
Option 1: http://www.willpeavy.com/minifier/
Minify HTML (or XHTML), and any CSS or JS included in your markup
The online HTML Compressor is used to compress HTML code by removing unnecessary white spaces, line breaks, tabs and other extra objects. Results in highly compressed HTML. The tool also shows the savings you got by compressing your HTML.
Option 3: http://www.dirtymarkup.com/
DirtyMarkup combines the power of HTML Tidy, CSS Tidy, JS Beautify, and the Ace editor to effortlessly clean up your messy code. Just paste your code into the editor and press “clean”.
Option 4: http://jsbeautifier.org/