SafeToolkits

SQL Formatter

Format SQL queries for readability.

Runs in your browser: what you paste is never uploaded

How to use SQL Formatter

  1. 1Paste or type your inputUse the box above, or click Sample to try it with an example.
  2. 2Choose your optionsChoose the SQL dialect (PostgreSQL, MySQL, SQL Server, BigQuery and more), keyword case and indent.
  3. 3Copy the resultCopy it with one click. Nothing is sent anywhere.

About SQL Formatter

Format long or one-line SQL queries into readable, indented statements, with dialect-aware keywords.

Frequently asked questions

Does it run or validate my query?

No. It only reformats the text; nothing is executed or sent to a database.

Why pick a dialect?

Dialects differ in keywords, quoting and operators, so choosing yours avoids misformatting things like PostgreSQL's :: casts or T-SQL brackets.

Is what I paste sent anywhere?

No. The tool runs entirely in your browser and never sends what you type or paste to a server.

Is it free?

Yes. It's free, with no sign-up and no limits.

Related tools