Free · Many dialects · Nothing uploaded

SQL formatter

Beautify messy SQL queries with clean indentation and keyword casing, for MySQL, PostgreSQL, SQL Server, SQLite, BigQuery and more. Everything runs in your browser.


          

🔒 Your SQL is formatted entirely on your device — never uploaded.

How to format SQL

Turn a cramped, hard-to-read query into clean, indented SQL with consistent keyword casing.

📥

1. Paste your SQL

Drop in a query for MySQL, PostgreSQL, SQL Server and more.

2. Format

Get tidy indentation, line breaks and uppercased keywords instantly.

📋

3. Copy

Copy the beautified query back into your editor or ticket.

A SQL formatter makes long SELECTs, JOINs and CTEs readable, which helps with code review, debugging and sharing queries with teammates. Consistent formatting also reduces mistakes by making the structure of the statement obvious. It runs locally, so proprietary queries stay private. For other code, use the Code Beautifier.

SQL formatter FAQ

Which dialects?

Standard SQL, MySQL, MariaDB, PostgreSQL, SQL Server, SQLite, BigQuery, Snowflake, Redshift and more.

Is my SQL uploaded?

No — formatting runs entirely in your browser.

Indentation & case?

Choose 2/4 spaces or tab, and uppercase/lowercase keywords.