Loading...

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
  1. Paste your SQL query into the input
  2. Select SQL dialect if specific to a database
  3. Choose indentation style
  4. Click Format SQL to beautify
  5. Or click Minify to compress
  6. 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.