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.
How to use SQL Formatter
- Paste your SQL query.
- Pick dialect, keyword case, and indent.
- 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.
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.