Skip to main content

SQL Formatter & Minifier

Pretty-print or compress SQL queries — supports major dialects, runs in your browser.

About this tool

The SQL Formatter pretty-prints or compresses SQL queries using a tokenizer that handles single-quoted strings, double-quoted identifiers, backtick-quoted MySQL identifiers, line comments (--, #), and block comments (/* ... */).

Privacy

All formatting is purely client-side — SQL never leaves the browser.