clang-format

Install command:
brew install clang-format

Also known as: clang-format@23

Formatting tools for C, C++, Obj-C, Java, JavaScript, TypeScript

https://clang.llvm.org/docs/ClangFormat.html

License: Apache-2.0 WITH LLVM-exception

Development: Pull requests

Formula JSON API: /api/formula/clang-format.json

Formula code: clang-format.rb on GitHub

Bottle (binary package) installation support provided for:

macOS on
Apple Silicon
golden gate ✅
tahoe ✅
sequoia ✅
Linux ARM64 ✅
x86_64 ✅

Current versions:

stable ✅ 23.1.4
head ⚡️ HEAD

Other versions:

clang-format@11 11.1.0 Formatting tools for C, C++, Obj-C, Java, JavaScript, TypeScript

Depends on when building from source:

cmake 4.4.5 Cross-platform make

Uses from macOS: python

Binaries: clang-format, git-clang-format

GitHub Packages downloads:

Last 30 days79,660
Downloads4,191,370
Analytics install events (30 days)6,560
Downloads / install events (30 days)12.1×

Source: GitHub Packages, fetched 2026-11-02T00:43:11Z. Analytics dates: 2026-10-03 to 2026-11-02. Totals exclude downloads from Bintray before the migration to GitHub Packages. Downloads and install attempts measure different things; the difference does not count analytics opt-outs. Definitions and limitations.

Analytics:

30 days90 days365 days
Installs6,54814,63583,626
Installs (--HEAD)1230140
Installs on Request6,38414,24477,300
Installs on Request (--HEAD)1230139
Build Errors8