Skip to content

SQL Formatter

Format and beautify SQL for PostgreSQL, MySQL, SQLite, BigQuery and more. Queries stay in your browser.

No uploads
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 = TRUE
GROUP BY
  u.id,
  u.name
HAVING
  count(o.id) > 3
ORDER BY
  orders DESC
LIMIT
  20;

How to use SQL Formatter

  1. 1Open SQL Formatter. It runs in your browser, no sign-up.
  2. 2Type or paste your input.
  3. 3Copy or download the result.

Questions

Is my query sent anywhere?

No. Formatting happens in your browser — safe for production queries.

Does it validate SQL?

It reports syntax it cannot parse, but it does not check tables or columns.

More tools