SQLSQL Formatter
Format and beautify SQL queries
What is SQL Formatter?
SQL Formatter is a tool that automatically reformats messy, single-line, or poorly indented SQL queries into a clean, readable layout. It supports major dialects including Standard SQL, MySQL, and PostgreSQL, and handles keyword casing and indentation automatically. It is great for cleaning up queries during code reviews, debugging, or documentation.
How to Use
- Select the dialect that matches your database (Standard SQL, MySQL, or PostgreSQL) from the dropdown at the top.
- Paste the SQL query you want to clean up into the left Input SQL area.
- Click the Format button — the neatly formatted query will appear in the right Formatted SQL area, ready to copy with the copy button.