Toolhaus

SQL Formatter

Format and beautify SQL queries for MySQL, PostgreSQL and more.

Formatted SQL

Formula & methodology

Parses the statement with a dialect-aware tokenizer and re-prints it with consistent indentation and line breaks around clauses.

Worked example

  • select id,name from users where age>18SELECT id, name FROM users WHERE age > 18

Frequently asked questions

Which SQL dialects are supported?

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

Is my query sent anywhere?

No. Formatting happens entirely in your browser and nothing is uploaded.

Privacy

All processing happens locally in your browser. Your data is never uploaded.

Related tools