Skip to main content
Loading navigation…
Loading page…
Home
Tools
Developer
SQL Formatter
SQL Formatter
Loading tool workspace...
Related Tools You May Need
JSON Formatter
Regex Tester
JSON Validator
Base64 Encoder/Decoder
All Tools
Format
Minify
Explain
Optimize
Dialect:
Standard ANSI SQL
PostgreSQL
MySQL / MariaDB
SQLite
SQL Server (T-SQL)
Oracle PL/SQL
Uppercase Keywords (SELECT, WHERE, JOIN)
Indentation:
2 spaces
4 spaces
Tab
Load Sample Query
Input SQL
Clear
select u.id, u.username, u.email, count(o.id) as total_orders, sum(o.amount) as total_spent from users u left join orders o on u.id = o.user_id where u.status = 'active' and u.created_at >= '2025-01-01' group by u.id, u.username, u.email having count(o.id) > 5 order by total_spent desc limit 50;
Formatted SQL
Copy
Run Format