Last week I was working on some T-SQL query codes. I remembered that I used PL/SQL developer tool to reformat my SQL codes by using Beautifier. I could not find similar tool in SQL Server Management Studio, at least for SSMS 2005/2008. I googled web to see if there is any tools available.
To my surprise, I found couple very nice web on-line tools called as code formatter. For example, Instant sQL Formatter is the tool I want. In addition to parse codes into a nice format, it also does basic syntax checking. The only thing is missing is the spaces for indention.
In addition to TSQL, I found several other web tools for code formatter:
- Online JavaScript beautifier, format long line of JS into a nice format.
- JavaScript Beautifier - Online Code Beautifier for JS
- Pretty Printer for PHP, Java, C++, C, Perl, JavaScript, CSS
- Quick highligher provides format for a list of codes, but not adding break lines for JS.
- SO question about code beautifier