What Free SQL Formatting Tools exist?

SqlFormatting

Sql Problem Overview


I want to beautify the SQL Queries I write.

What free tools exist that allow for SQL query formatting?

Sql Solutions


Solution 1 - Sql

PoorMansTSqlFormatter is a free and open-source online beautifier, with offline SSMS Add-In, command-line beautifier tool, and Notepad++ plugin.

The project aims to format any T-SQL (2000 or later) script, no matter the length or complexity.

Hope this helps!

Solution 2 - Sql

As of 10.02.2022 the site is not reachable anymore.

T-SQL Tidy (dead link: http://www.tsqltidy.com) is a very good online SQL formatter/beautifier.

It has a lot of formatting options. Although it's targeted to T-SQL, it should work with most SQL dialects.

Solution 3 - Sql

There is a free online http://www.dpriver.com/pp/sqlformat.htm">Instant SQL Formatter. The site also sells some other versions (add-in for Visual Studio, for example), but the online version is free.

Solution 4 - Sql

red Jul 22 '10 at 15:13 @Christopherous 5000

I was looking for the same in notepad++ and found a link that gives an idea of how to create your own formatting with macros: http://peoplesoft.wikidot.com/formatting-sql-in-notepad. Seems like it would work, but I'm going to use one of the SSMS Add-ins above. (Less work) Thanks!

Solution 5 - Sql

I've always been a fan of navicat - http://www.navicat.com

Their lite version is free, but it still comes with the sql beautifier - http://www.navicat.com/en/products/navicat_premium/premium_feature.html

As an added bonus occasionally you'll find some chinglish hiding in odd places.

Solution 6 - Sql

http://www.sequelpro.com/">Sequel Pro If using OS X otherwise just work out what you need then develop your query using your knowledge and use the command line tool(my personal favourite:)).

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestiongradyView Question on Stackoverflow
Solution 1 - SqlTaoView Answer on Stackoverflow
Solution 2 - SqlMicSimView Answer on Stackoverflow
Solution 3 - SqlAaron DView Answer on Stackoverflow
Solution 4 - SqlgasmanView Answer on Stackoverflow
Solution 5 - SqlscarymanView Answer on Stackoverflow
Solution 6 - SqlDeanView Answer on Stackoverflow