SQL Formatter
Format and beautify your SQL queries for better readability
SQL Input
Paste your SQL query here
Formatted SQL
Your beautifully formatted SQL query
How to Use SQL Formatter
- Select your SQL dialect from the dropdown
- Paste your SQL query into the input area
- Click "Format SQL" to beautify your query
- Copy the formatted result or download as a file
Features
- Multi-dialect Support: Works with MySQL, PostgreSQL, SQLite, and more
- Keyword Formatting: Proper capitalization of SQL keywords
- Indentation: Clean, readable structure
- Line Breaks: Logical separation of clauses
- Copy & Download: Easy export options
Formatting Rules
- Keywords are converted to uppercase
- Each major clause starts on a new line
- SELECT fields are indented and separated by lines
- JOIN conditions are properly indented
- Consistent spacing throughout