SQL Formatter

Beautify and minify SQL queries. Format for readability or compress for production.

What does the SQL Formatter do?

Formats SQL queries for readability: indentation, line breaks, keyword highlighting. Beautify adds structure; Minify removes whitespace for smaller size.

What is it used for?

  • Debugging: Read complex queries more easily
  • Code review: Share formatted SQL in PRs
  • Documentation: Pretty-print examples
  • Production: Minify for logging or storage

Supported SQL

Works with standard SQL: SELECT, INSERT, UPDATE, DELETE, JOINs, subqueries, CTEs. Handles most dialects (MySQL, PostgreSQL, etc.).