// free tool

SQL Formatter

Format and beautify SQL queries with consistent indentation and uppercased keywords. Runs entirely in your browser.

Paste any SQL query — SELECT, INSERT, UPDATE, DELETE, CTEs, window functions — and get clean, readable output with uppercased keywords and consistent indentation. Nothing leaves your browser.

Input SQL
Formatted
SELECT u.id,
u.email,
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.status = 'active'
GROUP BY u.id,
u.email
HAVING count(o.id) > 5
ORDER BY orders DESC
LIMIT 100;
// faq

Frequently asked questions

Is my SQL sent to a server?
No. The formatter runs entirely in your browser — safe to paste production queries, PII column names, and internal schema details.
Which SQL dialects are supported?
The formatter is dialect-agnostic and works well for PostgreSQL, MySQL, SQLite, SQL Server, Snowflake, BigQuery, and Redshift for common SELECT / INSERT / UPDATE / DELETE / CTE / window function patterns.
What formatting rules does it follow?
Keywords are uppercased, major clauses (SELECT, FROM, WHERE, JOIN, GROUP BY, ORDER BY, LIMIT) start on new lines, sub-clauses are indented, and multi-column lists wrap consistently. Comments and string literals are preserved.
Why format SQL?
Consistent formatting makes diffs readable in code review, surfaces bugs (missing JOIN condition, ambiguous alias), and speeds up scanning long queries. It's the SQL equivalent of Prettier for JavaScript.
// let's build something

Start your project request

Tell us what you're building — engineering capacity, AI, QA, cloud, or a fixed-scope software engagement. Our NYC team responds within one business day.

// what to expect
  • Response within 1 business day
  • 30-minute discovery conversation
  • Recommended engagement model & pricing
  • NYC-focused — in-person available
Start Project Request

Inbound sales only. All form information is encrypted in transit.