Indented.net lets you automatically clean up your code with just a few clicks and some behind-the-scenes magic.
Indented.net is meant for C-like languages. It should work well with Java, PHP and the like, but don't expect the same results with, say, Pascal or Fortran.
Open Source
Indented.net uses a home-made open source application, written in PHP. That means you can download the code, read it, and possibly learn something from it!