SQL Formatter
Paste raw SQL and get a properly formatted, keyword-capitalized, indented query.
About the SQL Formatter
This SQL formatter beautifies your SQL queries with proper indentation and keyword capitalization. It makes complex queries readable and easier to debug.
How to Use
- Paste your SQL query into the input area
- Click "Format" to beautify
- Copy the formatted SQL
What Gets Formatted
- Keywords are capitalized (SELECT, FROM, WHERE, etc.)
- Proper indentation of subqueries
- Line breaks after commas in SELECT lists
- Alignment of ON clauses in JOINs
Supported SQL Dialects
This formatter works with standard SQL and is compatible with MySQL, PostgreSQL, SQL Server, Oracle, and SQLite queries.