Pretty Printer for T-SQL?

SQL Prompt has a code formatter and SSMS + VS integration


I can vouch for the RedGate's products, including SQL Prompt. I use several of their tools, and their support is terrific.


A free and open source alternative to the paid for options that everyone else has listed is Poor Man's T-SQL Formatter. It integrates nicely with SQL Server Management Studio. The options for configuring how the SQL is formatted are somewhat limited when compared to the other tools, but for the price it's hard to complain, and if you really want to change it, the source is available for you to tweak.


SQL formatter add-on for Management Studio?

Here is the one(sql pretty printer add-inf for ssms) that we are using.