Web Toolkit

SQL Formatter

Beautify SQL queries with dialect-aware keyword casing and indentation.

SQL

Input0 chars
Formatted
Formatting is cosmetic only. No connection is made and no query is executed.

Private by design. Everything runs locally in your browser. Your input is never uploaded, logged or stored on a server.

Frequently asked questions

Which SQL dialects are supported?

Standard SQL plus PostgreSQL, MySQL, MariaDB, SQLite, BigQuery, Snowflake, Redshift, Transact-SQL, PL/SQL and Db2.

Does formatting change what my query does?

No. Only whitespace and keyword casing change. The parsed statement is identical.

Is my query sent anywhere?

No. The formatter runs as JavaScript in your browser. No database connection is opened and no query is transmitted.

Can it format multiple statements at once?

Yes. Statements separated by semicolons are each formatted and kept in order.

About the SQL Formatter

Generated SQL — from an ORM, a log line or a BI tool — usually arrives as one long line. This formatter breaks it into clauses, indents subqueries and joins, and normalises keyword casing so the shape of the query becomes visible before you try to read it.

Pick the dialect that matches your database. Dialect-specific syntax such as PostgreSQL :: casts, MySQL backtick quoting and BigQuery backtick-qualified table names are only parsed correctly when the right dialect is selected.

Formatting is purely cosmetic. Nothing is executed, no connection is made, and the semantics of your query are unchanged.

Related tools