Skip to content
FizzKit

SQL Formatter

Indent and align SQL queries for readability. Supports PostgreSQL, MySQL, SQL Server, SQLite, Oracle, and standard ANSI SQL dialects.

Runs locally in your browser
For long queries, open fullscreen for a wider view
Raw SQL
269 chars · 1 line
Formatted
SELECT
  u.id,
  u.name,
  u.email,
  count(o.id) AS orders,
  sum(o.total) AS revenue
FROM
  users u
  LEFT JOIN orders o ON o.user_id = u.id
WHERE
  u.created_at >= '2025-01-01'
  AND u.active = TRUE
GROUP BY
  u.id,
  u.name,
  u.email
HAVING
  count(o.id) > 5
ORDER BY
  revenue DESC
LIMIT
  50;
Input
269 B
Output
299 B
Lines
22
Statements
1
Dialect
postgresql

About SQL Formatter

Indent and align SQL queries for readability. Supports PostgreSQL, MySQL, SQL Server, SQLite, Oracle, and standard ANSI SQL dialects.

SQL Formatter is part of FizzKit — a collection of focused, browser-based tools. Because everything runs locally, it works offline once loaded and never exposes your data to a remote server.

Frequently asked questions

PostgreSQL, MySQL, MariaDB, SQLite, SQL Server (T-SQL), BigQuery, Snowflake, Redshift, and Oracle PL/SQL.