Skip to main content
T

SQL Formatter & Minifier

Paste any SQL query and get it formatted with proper indentation, keyword casing, and clause breaks. Supports 10 dialects including PostgreSQL, MySQL, SQLite, BigQuery, Snowflake, Redshift, and T-SQL. Includes a minify mode.

Advertisement

How to use SQL Formatter

  1. Paste your SQL query.
  2. Pick dialect, keyword case, and indent.
  3. Click Format or Minify.

What is SQL Formatter?

Powered by the sql-formatter library. Format settings include keyword case (UPPER / lower / preserve), tab width, and dialect. The minify mode strips comments and collapses whitespace while preserving string literals.

Advertisement

FAQ

Does it execute the SQL?
No — purely a formatter. Your query is never run against a database.
Is my SQL uploaded?
No. Formatting runs entirely in your browser.

Related tools