🗄️ SQL Formatter
Pretty-print messy SQL in one click.
Formatted
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.active = 1
AND u.created_at >= '2024-01-01'
GROUP BY u.id,
u.name
ORDER BY orders DESC
LIMIT 10;Clause-per-line formatting with indented JOINs and WHERE conditions — strings and comments stay intact.
More tools from ToolHord
Palindrome Checker Check if text reads the same forwards and backwards. Text & Data Line Deduplicator Remove duplicate lines from any text instantly. Text & Data Random Line Shuffler Randomize the order of any lines. Generators Detailed Text Stats Character-level analysis: letters, digits, symbols & more. Text & Data