# TaoK/PoorMansTSqlFormatter

A small free .Net and JS library (with demo UI, command-line bulk formatter, SSMS/VS add-in, notepad++ plugin, winmerge plugin, and demo webpage) for reformatting and coloring T-SQL code to the user's preferences.

Repository: https://github.com/TaoK/PoorMansTSqlFormatter
Canonical: https://ross.abutalabs.com/products/poormanstsqlformatter
Homepage: http://www.architectshack.com/PoorMansTSqlFormatter.ashx
Language: JavaScript
License: AGPL-3.0
License Family: copyleft
Last push: 2023-07-14T07:49:43+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 5609, "days_push": 1146, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1021, forks 300 (observed 2026-08-28T04:03:15.672686+00:00)

## What it is
A small free .NET and JavaScript library for reformatting and colorizing T-SQL code according to user preferences. It ships with multiple integrations including a command-line bulk formatter, SSMS/Visual Studio add-ins, Notepad++ and WinMerge plugins, and a demo webpage.

## Use cases
- format t-sql code
- pretty print sql server scripts
- bulk reformat many sql files from the command line
- add sql formatting to notepad++ or ssms
- colorize t-sql as html
- format sql in the browser with javascript

## When to choose
- you work with T-SQL / SQL Server specifically and want configurable formatting
- you need fault-tolerant formatting that survives unknown or malformed SQL constructs
- you want a formatter usable from .NET, JavaScript, CLI, or common editors like SSMS and Notepad++

## When to avoid
- you need a full SQL parser or strict AST guarantees - parsing is deliberately coarse
- you need other SQL dialects like PostgreSQL or MySQL - only T-SQL is supported
- you need exact preservation of comment placement in all cases

## Facets
- artifact type: library
- maturity: maintenance
- function: formatter, parser, cli, plugin-system
- domain: developer-tools, databases, text-editors
- platform: dotnet, browser, windows, cross-platform
- tags: tsql, sql-formatting, sql-server, ssms-addin, notepad-plus-plus, syntax-highlighting, nodejs

## Member repositories
- TaoK/PoorMansTSqlFormatter (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:15.672686+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T07:08:48.964961+00:00, confidence not recorded.
  - readme: https://github.com/TaoK/PoorMansTSqlFormatter (fetched 2026-08-28T04:03:15.672686+00:00, sha b99cf7c118c8)
- Data as of 2026-08-30T08:39:29.467469+00:00.
