Use Sublime Text 2 to beautify HTML, CSS and JavaScript
First of all you have to install Package Control in Sublime Text 2 as I explained before. Then install nodejs in your system. In Ubuntu you can do that running this command:
sudo apt-get install nodejs-legacy