SQL formatter online

Paste a query written in one breath and get a clean, indented version you can actually read.

🔒 Formatted 100% locally — your queries never leave your browser.

Why the dialect selector is not decoration

SQL is a standard that every vendor extended in its own direction. LIMIT 10 in MySQL and PostgreSQL becomes TOP 10 in SQL Server. Backticks quote identifiers in MySQL, double quotes do it in PostgreSQL, square brackets in T-SQL. A formatter that ignores this will mangle keywords it does not recognise and break your quoting.

Picking the right dialect here means the parser knows which words are keywords and which are your table names.

What formatting reveals

Indentation is not cosmetic on a long query. Once the joins line up, a missing ON clause becomes visible, a GROUP BY that does not list every non-aggregated column stands out, and nested subqueries stop hiding inside one another.

Most SQL performance problems are read before they are measured — and you cannot read a query that arrives as a single 400-character line.

Frequently asked questions

Does formatting change what my query does?

No. Only whitespace and line breaks change; the SQL is semantically identical.

Which dialects are supported?

Standard SQL, MySQL, PostgreSQL, MariaDB, SQLite and SQL Server (T-SQL).

Is my query sent anywhere?

No. Formatting runs in your browser, which matters since queries often contain table and column names you would rather not share.

Related tools