SQL Formatter
Pretty-print SQL queries with consistent indentation.
SELECT u.id, u.name, count(o.id)
AS orders
FROM users u
LEFT
JOIN orders o
ON o.user_id = u.id
WHERE u.created_at > '2026-01-01'
AND u.active = 1
GROUP BY u.id, u.name
ORDER BY orders descAbout this tool
Paste any SQL — SELECT, INSERT, UPDATE, DELETE, JOINs, CTEs — and get a tidier version with keywords capitalised and clauses on their own lines.