SQL Formatter
Free online SQL beautifier and minifier.
SQL
SQLL Formatter
Interactive Tool
Input
The SQL Formatter pretty-prints SQL queries with keyword-aware indentation: SELECT lists, JOINs, WHERE conditions and GROUP BY clauses each start on their own line so complex queries become readable at a glance. It handles strings, quoted identifiers, and – / /* */ comments correctly. A Minify mode packs the query onto as few lines as possible.
All formatting happens locally in your browser with plain JavaScript. Your SQL never leaves the device, which is ideal for queries containing sensitive schema or data.