SQL Formatter is a free online tool that helps you format and beautify SQL queries. It adds proper indentation, line breaks, and keyword capitalization, making complex SQL queries easy to read and debug — no signup, no installation, completely private.
Format:Convert compressed SQL to readable format with customizable indentation (2/4 spaces).
Minify:Compress SQL to a single line, removing all whitespace and comments to reduce data transfer size.
SQL Formatter is a free online tool that helps you format and beautify SQL queries. It adds proper indentation, line breaks, and keyword capitalization, making complex SQL queries easy to read and debug — no signup, no installation, completely private.
Paste your SQL
Copy your SQL query and paste it into the input area.
Choose SQL dialect
Select the SQL dialect (MySQL, PostgreSQL, etc.) for dialect-specific formatting.
Format or minify
Click "Format" to beautify the SQL or "Minify" to compress it to one line.
Copy the result
Click the copy icon to copy the formatted SQL to your clipboard.