Free SQL Formatter & Beautifier

Beautify SQL with your dialect's syntax, keyword casing, and indent width — queries never leave your device.

SQL input
Formatted SQL

How to use / FAQ

Paste any query and it's re-indented as you type — pick your database's dialect, choose UPPERCASE or lowercase keywords, and set the indent width. Formatting happens entirely in your browser, which matters for SQL: queries routinely contain table names, filters, and literal values you don't want leaving your machine.

Which SQL dialects are supported?

Standard SQL plus PostgreSQL, MySQL, MariaDB, SQLite, BigQuery, SQL Server (T-SQL), and Oracle (PL/SQL). The dialect matters for syntax like PostgreSQL's :: casts, BigQuery's backtick-quoted project.dataset.table names, and T-SQL's bracketed identifiers — pick the wrong one and valid queries can be flagged as parse errors.

Does formatting change what the query does?

No — only whitespace, line breaks, and (if you choose) keyword casing change. Identifiers, strings, and the query's structure are untouched. Keyword case is safe to change because SQL keywords are case-insensitive in every supported dialect.

Should SQL keywords be UPPERCASE or lowercase?

Pure convention — the database doesn't care. UPPERCASE keywords are the traditional style and make keywords pop against lowercase identifiers; many modern teams prefer all-lowercase for less shouting. Preserve keeps whatever casing your input already has.

Does this validate my SQL?

Only as far as formatting requires. A parse error means the formatter couldn't make sense of the syntax (often a dialect mismatch or an unclosed quote), but a query that formats cleanly can still fail in your database — nothing here checks that tables or columns exist.

Is my SQL uploaded anywhere?

No. The formatter runs entirely in your browser — nothing you paste is sent to a server, so queries containing production table names, customer filters, or embedded values stay on your device.