An important aspect of writing code is formatting. No one likes badly formatted code. It’s hard to understand/maintain for people inheriting it and even for the author, when he/she checks it after week or so

I do understand that developers work under strict delivery guidelines and no one would want to delay the delivery on expense of formatting the code, making it nice and beautiful. However, with free T-SQL formatters it hardly takes time and one gets a clean formatted code without delaying the release. Here is list of T-SQL code formatters.

  1. Poor Man’s T-SQL formatter

It’s Open source T-SQL formatter. It is available both online – and as SSMS plugin

  1. TSQL Tidy

It’s available online at and it is also available as SSMS plugin at

  1. Instant SQL Formatter

The free online tool is available here

  1. SQL Format

The free online tool is available here

  1. ApexSQL Refactor

The free tool is available here –

  1. SQL-Format

The online free tool is available here

  1. Dbforge SQL Complete

It is a paid tool and is available here

  1. The simple talk code prettifier

The free online tool is available here

  1. RedGate SQL Prompt

Paid tool available here

10. SSMS tools pack

It is available here

Make use of the free tools and write a clean formatted code. Do add to the list if you know of any other formatting tool.


Like us on FaceBook Join the fastest growing SQL Server group on FaceBook

Follow me on TwitterFollow me on FaceBook