SQL Formatter
Format and beautify SQL queries with dialect support for MySQL, PostgreSQL, SQLite, and more.
How to use
- 1
Paste your SQL
Paste your SQL query into the input panel on the left.
- 2
Select your SQL dialect
Choose the SQL dialect that matches your database — MySQL, PostgreSQL, SQLite, SQL Server, and more.
- 3
Format or minify
Click Format to beautify your SQL with indentation and keyword casing, or Minify to compress it to a single line.
- 4
Copy the result
Click Copy to copy the formatted SQL to your clipboard.
Frequently asked questions
Which SQL dialects are supported?
Does formatting change the meaning of my SQL?
Is my SQL sent to a server?
Can I minify SQL as well as format it?
Format messy SQL queries into clean, readable code with configurable
indentation, keyword casing, and dialect-specific syntax. Supports
MySQL, PostgreSQL, SQLite, SQL Server, Oracle PL/SQL, BigQuery,
Snowflake, and many more. Also minifies SQL to a single line for
embedding in code. All formatting runs in your browser with no
data sent to any server.