sql-formatter
« Back to VersTracker
Description:
Whitespace formatter for different query languages
Type: Formula  |  Latest Version: 15.6.12@0  |  Tracked Since: Dec 15, 2025
Links: Homepage  |  formulae.brew.sh
Category: Developer tools
Tags: sql formatter developer-tools cli javascript database
Install: brew install sql-formatter
About:
SQL Formatter is a powerful JavaScript library and CLI tool designed to beautify and standardize SQL queries across multiple database dialects. It automatically handles indentation, keyword casing, and line breaks to improve code readability and maintainability. The tool supports various SQL flavors including BigQuery, PostgreSQL, and MySQL, making it versatile for diverse development environments.
Key Features:
  • Supports multiple SQL dialects (Standard SQL, BigQuery, PostgreSQL, MySQL, etc.)
  • Configurable formatting options (indentation, case, line breaks)
  • Zero-dependency library with CLI and API interfaces
  • Preserves comments and handles complex nested queries
Use Cases:
  • Standardizing SQL queries in team codebases for consistency
  • Formatting dynamically generated SQL from applications or ORMs
  • Beautifying SQL for documentation or reporting purposes
Alternatives:
  • pgFormatter – PostgreSQL-specific, requires Perl runtime
  • sqlparse – Python library, more focused on parsing than formatting
Version History
Detected Version Rev Change Commit
Dec 15, 2025 1:23pm 0 VERSION_BUMP be5ae9a5
Dec 10, 2025 11:49am 0 VERSION_BUMP 33753e80
Oct 2, 2025 8:24am 0 VERSION_BUMP 0c7225df