SQL Formatter

Format SQL queries with consistent keywords, indentation and line breaks.

This tool runs entirely in your browser. The file you choose is never uploaded to a server. Free, with no account required.

Input
SQL query
Output
Formatted SQL
Category
Developer Tools
Status
Available now
Price
Free — no subscription, no account

How to use SQL Formatter

  1. Paste your SQL query into the input box.
  2. Pick the SQL dialect that matches your database, then Format or Minify.
  3. Copy or download the result.

Frequently asked questions

Which SQL dialects are supported?

The formatter supports standard SQL plus MySQL, MariaDB, PostgreSQL, SQLite, Transact-SQL, PL/SQL, BigQuery, Hive, Redshift, Spark and Snowflake. Pick the closest match to your database.

Does minifying SQL touch quoted identifiers or string values?

No. Quoted strings and quoted identifiers (like "my column") are lifted out before whitespace is collapsed, so their inner spacing is preserved exactly.

Is my query uploaded anywhere?

No. Everything runs in your browser, so your query never leaves your device.

Is the SQL Formatter free?

Yes. It is completely free, needs no account, and has no usage limit.

Related tools