About the SQL formatter
Format or compact T-SQL for easier review without asking the tool to execute or repair the query.
What it does
- Formats T-SQL with two spaces, four spaces or tabs.
- Changes keyword case to uppercase, lowercase or preserves the selected behavior.
- Keeps GO batch separators outside protected comments and strings.
- Minifies SQL while preserving quoted strings, bracketed identifiers and comments.
How to use it
- Paste a T-SQL statement or script.
- Choose indentation and keyword case, then select Format or Minify.
- Review the output and any parser location before copying or downloading it.
Limitations
The formatter uses a general T-SQL parser plus a small set of safe normalizations. It is not a complete SQL Server parser and does not execute, validate against a database or repair incomplete SQL.
Privacy
SQL formatting and minification run locally in your browser. Query text is not uploaded for processing.