Skip to content
KitWren
Website

SQL Formatter

Format SQL queries for PostgreSQL, MySQL, SQL Server, SQLite, Oracle, BigQuery and more.

  1. Paste your input
  2. Choose the options
  3. Copy the output
Runs in your browser. Your data and files never leave your device.

About the SQL Formatter

Paste a query to get uppercase keywords and clean line breaks for each clause. Choose your database dialect for correct handling of its syntax.

Example

select id,name from users where active=1 order by name becomes SELECT id, name / FROM users / WHERE active = 1 / ORDER BY name — each clause on its own line with uppercase keywords.

Frequently asked questions

Why choose a dialect?

Databases differ in syntax such as identifier quotes (backticks in MySQL, double quotes in PostgreSQL, brackets in SQL Server) and special keywords. The right dialect avoids mangling them.

Does it run or check my query?

No — it only formats text. It doesn’t connect to a database.