sqlfmt
« Back to VersTracker
Description:
SQL formatter with width-aware output
Type: Formula  |  Tracked Since: Dec 28, 2025
Links: Homepage  |  formulae.brew.sh
Category: Developer tools
Tags: sql formatter developer-tools code-quality cli
Install: brew install sqlfmt
About:
Sqlfmt is a command-line utility that automatically formats SQL code to adhere to consistent style standards. It handles indentation, line breaks, and keyword capitalization to improve readability and maintainability of database queries. The tool features width-aware formatting that intelligently wraps long lines to fit specified display widths.
Key Features:
  • Width-aware line wrapping for improved readability
  • Consistent indentation and spacing rules
  • Support for multiple SQL dialects
  • Zero-configuration with sensible defaults
Use Cases:
  • Standardizing SQL code across team projects
  • Preparing SQL queries for documentation or publication
  • Cleaning up auto-generated SQL from ORMs or BI tools
Alternatives:
  • pgFormatter – PostgreSQL-specific formatter, while sqlfmt supports multiple dialects
  • sqlparse – Python library requiring code integration, while sqlfmt is a standalone CLI tool
Version History
Detected Version Rev Change Commit
Sep 15, 2025 12:12pm 0 VERSION_BUMP 144fd668
Sep 13, 2024 4:59am 0 VERSION_BUMP 665df456