Have put together freeware Windows GUI and command-line versions of an SQL formatting/indenting utility.
http://www.curiousdevelopments.net/opensource/SQLNeatener.zip
It is ambitious in its formatting, trying to do much more than match the starts and ends...