Skip to main content
SQL Tools

SQL Formatter

Format and minify SQL Server queries directly in your browser.

Your data stays in your browser.

Formatting options
Tool guide

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

  1. Paste a T-SQL statement or script.
  2. Choose indentation and keyword case, then select Format or Minify.
  3. 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.