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.6
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.5.1 Cross-platform make

Uses from macOS: python

Binaries: clang-format, git-clang-format

GitHub Packages downloads:

Last 30 days87,486
Downloads4,262,674
Analytics install events (30 days)6,787
Downloads / install events (30 days)12.9×

Source: GitHub Packages, fetched 2026-11-22T01:00:37Z. Analytics dates: 2026-10-23 to 2026-11-22. 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,77418,30981,421
Installs (--HEAD)1331129
Installs on Request6,62117,86275,729
Installs on Request (--HEAD)1331128
Build Errors6