Right Way SQL Formatter — SSMS 22 Extension Gallery feed (extension)
T-SQL formatting extension for SQL Server Management Studio 22 (VS 2022 shell). For SSMS 17-20 use the SSMS18 build.
▼ Download- Author
- right-way-sql-formatter
- Version
- 2.1.8
- Updated
- 2 months ago
- Tags
- SQL, T-SQL, SSMS, formatter, format, beautifier, pretty-print
- Supports
- SSMS 22
Right Way SQL Formatter — SSMS 22 Extension
Format T-SQL inside SQL Server Management Studio 22 — the classic "Poor Man's T-SQL Formatter" style, modernized. The same engine powers the VS Code extension and a CLI, battle-tested against 396 real-world SQL files (First Responder Kit, Ola Hallengren, sp_WhoIsActive, DarlingData, tSQLt).

What you get in SSMS
- Format Document / Format Selection from the Tools menu, the query editor context menu, or Ctrl+K, F.
- Options dialog (Tools ▸ Right Way SQL Formatter Options) with grouped settings — from classic SSMS defaults to trailing commas, vertical alignment of columns and JOINs, and compact single-statement blocks. Settings persist across SSMS restarts.
- Never destroys invalid SQL — unparseable input still gets best-effort formatting plus a diagnostic comment describing what's wrong, never a silent failure.
- Your style, preserved — both
expr AS aliasandalias = exprcolumn alias styles are kept as you wrote them.


Installation
SSMS 22 has no Extension Manager UI, but installs VSIXes directly — no admin rights needed:
Download the
.vsixfrom this page.Close SSMS.
Run it with SSMS's own installer:
"C:\Program Files\Microsoft SQL Server Management Studio 22\Release\Common7\IDE\VSIXInstaller.exe" RightWaySqlFormatter.SSMS22.vsix(Double-clicking the file routes to Visual Studio's installer if VS is installed, which also works — make sure "SQL Server Management Studio 22" is ticked.)
Start SSMS — the commands appear under Tools and in the query editor right-click menu.
To uninstall:
"C:\...\SSMS 22\Release\Common7\IDE\VSIXInstaller.exe" /uninstall:e857c020-26ea-4b6f-b0d0-d97fb572ee81
Which SSMS versions?
| SSMS | Build |
|---|---|
| 22+ | This extension |
| 17–20 | SSMS18 build (manual install; see repo) |
Note: Microsoft does not officially support extensions in SSMS 21/22 — an SSMS update may require reinstalling the extension.
Example
Input:
select e.employeeid,e.firstname,e.lastname,d.departmentname from employees e inner join departments d on e.departmentid=d.departmentid where e.active=1 order by e.lastname
Output (default settings):
SELECT
e.EmployeeId
,e.FirstName
,e.LastName
,d.DepartmentName
FROM employees e
INNER JOIN departments d
ON e.DepartmentId = d.DepartmentId
WHERE e.Active = 1
ORDER BY e.LastName
Source, issues, license
Free and open source under AGPL v3, forked from PoorMansTSqlFormatter by Tao Klerks. Report issues and find the CLI + VS Code extension at github.com/BadMonkeySoftware/right-way-sql-formatter.