Developer tools / Local processing

SQL Formatter

Format SQL with indentation and a supported dialect.

How to use SQL Formatter

  1. Paste SQL or choose a .sql file. Select the dialect used by the query: Standard SQL, PostgreSQL, MySQL, SQLite, Transact-SQL, or BigQuery.
  2. Choose keyword casing and two- or four-space indentation, then select Format SQL.
  3. Inspect the formatted query and download formatted.sql. Review it before running it in your database.

What this tool does

Formatting does not validate query behavior or execute SQL.

Example

Format select department, count(*) as total from employees group by department; with PostgreSQL selected and uppercase keywords to put clauses on separate lines.

Frequently asked questions

Does formatting validate or run the query?

No. It changes layout and keyword casing only. It does not connect to a database, execute SQL, or establish that the query is valid.

Does selecting another dialect translate the SQL?

No. Select the dialect that matches your query so the formatter can apply its supported syntax rules; it does not translate between database systems.

Privacy

Your input is processed in your browser. This version does not send document content to a conversion server and includes no advertising or analytics scripts. Loading the website requires a network connection.

Operator: Francescco Pernice Botta. Contact: klabindustries.hq@gmail.com.

Terms

Use this tool only with content you are allowed to process. Check the result before relying on it.

Contact

Operator: Francescco Pernice Botta. Contact: klabindustries.hq@gmail.com.