Beautify and minify SQL with dialect support, keyword casing, indent controls, and IDE syntax highlighting.
SQL Formatter
Beautify SQL with dialect support, keyword casing, and IDE syntax highlighting.
Input SQL
Query editor
Output
Formatted SQLsql | query.sql
SELECT
u.id,
u.name,
count(o.id) AS order_count
FROM
users u
LEFT JOIN orders o ON o.user_id = u.id
WHERE
u.active = 1
AND u.created_at >= '2024-01-01'
GROUP BY
u.id,
u.name
HAVING
count(o.id) > 0
ORDER BY
order_count DESC
LIMIT
25Keep exploring
Click a question to open it. Click again to close.
Looking for more? Browse Our Tools.