SqlSmash lets you format and indent your SQL script according to your preferences. You can choose the casing preferences for built in types, functions, Keywords, variables and identifiers. You can also choose whether to insert new lines before or after commas and logical operators (like Or, And).
Just select the text you want to format and click on SqlSmash->Format Sql. If you don’t select any text, the whole document is formatted.