SQL Formatter
Format and beautify SQL queries. Support for multiple SQL dialects with customizable indentation.
- Format and beautify SQL queries
- Support for multiple SQL dialects (MySQL, PostgreSQL, T-SQL, PL/SQL)
- Customizable indentation (2 spaces, 4 spaces, tabs)
- Uppercase keywords option
- SQL minification
- Copy formatted output
- Paste your SQL query into the input
- Select SQL dialect if specific to a database
- Choose indentation style
- Click Format SQL to beautify
- Or click Minify to compress
- Copy the result
Standard SQL, MySQL, PostgreSQL, T-SQL (SQL Server), and PL/SQL (Oracle). The formatter handles most common syntax variations.
This tool focuses on formatting rather than validation. It will format your SQL as-is, so ensure your syntax is correct before formatting.
Minification removes unnecessary whitespace and is useful for embedding SQL in code or reducing payload size in applications.