Formatting preserves identifiers and aliases. Style suggestions are not database validation. Maximum input: 100,000 characters.

INPUT 0 characters, 0 lines
OUTPUT
Ctrl + Enter

Turning history off also clears saved queries. Shared links contain your SQL; only share queries you intend others to read.

Client-Side Only

SQL formatting happens locally in your browser. Analytics records usage metadata, not SQL text. See our privacy details.

9 Dialects

PostgreSQL, MySQL, SQL Server, BigQuery, SQLite, MariaDB, Redshift, and Snowflake.

Saves Settings

Your indent size, keyword case, and dialect preferences are saved locally between sessions.

Query History

Optionally keeps your last 5 queries in this browser. Turn history off or clear it at any time.

Ctrl+Enter Format
Ctrl+Shift+C Copy
Ctrl+Shift+Backspace Clear
Ctrl+] Indent
? Shortcuts

Stop Squinting at One-Line Queries

Paste messy SQL, get readable code. SQL is processed locally in your browser.

Before
select u.id,u.name,u.email,o.total,o.created_at from users u inner join orders o on u.id=o.user_id where u.status='active' and o.total>100 order by o.created_at desc limit 10;
After
SELECT
  u.id,
  u.name,
  u.email,
  o.total,
  o.created_at
FROM users u
INNER JOIN orders o
  ON u.id = o.user_id
WHERE u.status = 'active'
  AND o.total > 100
ORDER BY o.created_at DESC
LIMIT 10;
PostgreSQL MySQL SQL Server BigQuery SQLite MariaDB Redshift Snowflake