Skip to content
Developer
Tool · SQL Formatter

🗄️ 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.