SQL Code Formatting is very important. Every SQL Server DBA has its own preference about formatting. I like to format all keywords to uppercase. Following are two online tools, which formats SQL Code very good. I tested following script with those tools and I found two of the tools worth mentioning here.