CodeFormatter is a Sublime Text 2/3 plugin that supports format (beautify) source code.
CodeFormatter has support for the following languages:
PHP - By PEAR PHP_Beautifier
JavaScript/JSON/JSONP - By JSBeautifier
HTML - By JSBeautifier
CSS - By JSBeautifier
Python - By PythonTidy (only ST2)