Format messy SQL queries into readable statements, or minify them to a single line.
Quick Answer
SQL Query Formatter lets you: Format messy SQL queries into readable statements, or minify them to a single line. To start, paste any SQL query into the editor.
Paste any SQL query into the editor.
Click Format to beautify it with proper indentation, or Minify to collapse it to one line.
Copy the formatted or minified SQL to your clipboard.
SQL input
Formatted output
—