The below configuration file haves [WayBack] ApexSQL Refactor – Free SQL formatter | ApexSQL produce quite OK formatted SQL, even for complex queries, not just for SQL Server.
So this is the second free tool I use from ApexSQL. The first one was ApexSQL, a free tool (SSMS add-in) for analyzing the execution plan of a SQL server query…
–jeroen