Developer

SQL Formatter

Paste messy SQL and get consistently formatted, readable output with proper indentation and uppercase keywords. Supports standard SQL plus MySQL, PostgreSQL, SQLite, SQL Server and BigQuery dialects. Your queries are formatted locally — nothing is sent to a server, so production SQL stays private.

Examples

Input
select id,name from users where active=1 order by name
Output
SELECT
  id,
  name
FROM
  users
WHERE
  active = 1
ORDER BY
  name

How to use SQL Formatter

Paste your query
Drop in any SQL — a one-line monster from a log file or an ORM-generated query.
Choose the dialect
Standard SQL works for most queries; pick MySQL, PostgreSQL, SQLite, SQL Server or BigQuery for dialect-specific syntax.
Copy the result
Copy or download the formatted SQL.

Why use this tool

Real SQL parser (sql-formatter) — handles subqueries, joins, CTEs and window functions
Six dialects: SQL, MySQL, PostgreSQL, SQLite, SQL Server, BigQuery
Uppercase keywords and consistent indentation
Queries never leave your device — safe for production SQL

Frequently asked questions

Yes. Formatting happens entirely in your browser — your SQL is never transmitted or stored. Still, avoid sharing queries containing embedded credentials.

Standard SQL, MySQL, PostgreSQL, SQLite, SQL Server (T-SQL) and BigQuery. Dialect affects how identifiers, operators and dialect-specific keywords are parsed.

No. Formatting only changes whitespace and keyword casing — the query logic is untouched.

Found a bug or have an idea?

ToolOrbit is actively developed — feedback directly shapes what gets built next.

Send feedback