Skip to content
snip tools

SQL formatter and beautifier

Beautify and indent SQL queries across major dialects. Runs entirely in your browser.

Runs 100% in your browser
 

How to format SQL

  1. Paste your SQL. Paste a query or script into the input.
  2. Pick your dialect. Select your database and keyword casing.
  3. Copy the result. Copy the formatted SQL.

About SQL formatting

Long queries pasted from logs or ORMs arrive as one dense line. Formatting them — consistent indentation, one clause per line, predictable keyword casing — makes them far easier to read, review and debug. Pick the dialect that matches your database so its specific keywords and operators are recognised. The formatting is purely cosmetic and never alters what the query does.

Frequently asked questions

Which SQL dialects are supported?
Standard SQL plus PostgreSQL, MySQL, MariaDB, SQLite, BigQuery, Snowflake, Transact-SQL and more — pick the one that matches your database so keywords and syntax are handled correctly.
Does it change what my query does?
No. Formatting only adds line breaks, indentation and consistent keyword casing. The query logic is unchanged.
Will it format a query with parameters or placeholders?
Yes — named (:id), numbered ($1) and ? placeholders are preserved.
Is my SQL uploaded?
No. Formatting runs entirely in your browser; the query never leaves your device.