a11y.skipToMainContent
1

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.

Was this tool helpful?
Send output to:
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

Author

MW
Marcus Webb"The DevTool Craftsman"

Full-Stack Developer & Tools Architect

Marcus has been writing code since the dial-up era. He has contributed to open-source developer tools, built CI/CD pipelines for startups, and debugged production incidents at 3 AM more times than he would like to admit. His philosophy is that the best developer tool is the one that gets out of your way, and he writes about practical tooling that helps teams ship faster with fewer headaches.

Advertisement