SQL Formatter

Format SQL queries locally without executing them.

Paste SQL to format it for readability or compact extra whitespace while preserving quoted text, quoted identifiers, and comments. This tool runs in your browser, never connects to a database, and never executes SQL.



How it works

The formatter applies whitespace, indentation, casing, and dialect-aware layout options to make SQL easier to read. Minify mode compacts repeated spacing outside quoted strings, quoted identifiers, and comments for safer copy-and-paste cleanup.

Dialect support affects keyword treatment and layout choices, not database execution. Formatting can change whitespace and casing, but it should not be treated as SQL validation, query optimization, or proof that a statement will run on a specific database engine.


References