Developer Tools
SQL Formatter
Format and beautify SQL queries with proper indentation and keyword uppercasing. Supports SELECT, INSERT, UPDATE, DELETE, CREATE, and more.
Free · Runs in your browser · No signup · Files stay on your device
1 line • 187 chars
Paste SQL, keep line numbers visible, and inspect or copy the formatted query without leaving fullscreen mode.
Quick examples
Formatted SQL
SELECT u.id, u.name, SUM(o.total) AS total_revenue FROM users u INNER JOIN orders o ON u.id = o.user_id WHERE o.status = 'paid' GROUP BY u.id, u.name ORDER BY total_revenue DESC LIMIT 10;
How to use
How to use SQL Formatter
- 1Paste your SQL query.
- 2See the formatted result instantly.
- 3Copy the formatted SQL.
Tips
Quick tips
- SQL keywords are automatically uppercased.
- Clauses like FROM, WHERE, JOIN get their own lines.
- Works with MySQL, PostgreSQL, SQL Server, and SQLite syntax.
FAQ
Frequently asked questions
Does this validate SQL syntax?
No, it formats the structure. Use your database client for validation.
Which SQL dialects are supported?
Standard SQL keywords work across MySQL, PostgreSQL, SQL Server, and SQLite.
Related