Prettier is a free, open-source code formatter that parses code and prints it in a consistent style, taking line length into account.
Alternatives to Black
Black is a free formatter for Python that applies a consistent style by rewriting whole files, with an 88-character default line length. Its limited style choices can help teams avoid formatting debates, and it checks that the reformatted code has an effectively equivalent syntax tree. Black connects with editors and GitHub Actions, supports notebook formatting through an extra, and includes a local HTTP server. It requires Python 3.10 or newer and is fundamentally a…
rustfmt is a free, open-source formatter for Rust code.
Ruff is a free Python linter and code formatter written in Rust.
- 4
Uncrustify
Uncrustify is a free, open-source source code formatter for C, C++, C#, Objective-C, D, Java, Pawn, and Vala.
Free planLinuxmacOSSelf-hostedWindows6.4Free plan - 5
swift-format
swift-format is a free, Apache-2.0 licensed tool for formatting and linting Swift source code.
Free planiOSLinuxmacOS6.3Free plan - 6
Spotless
Spotless formats source code and can check files for formatting violations or apply fixes.
Free planLinuxmacOSWindows6.2Free plan - 7

CSharpier
CSharpier is a free, open-source formatter that parses C# and XML code and reprints it according to its own formatting rules.
Free planAPILinuxmacOSWindows6.1Free plan - 8
elm-format
elm-format is a free formatter for Elm source code, applying rules based on the official Elm Style Guide.
Free planLinuxmacOSWindows6.1Free plan - 9
gofmt
gofmt is the Go source formatter included with Go installations, available on Linux, macOS, and Windows.
Free planLinuxmacOSWindows6.1Free plan - 10

RuboCop
Free planLinuxSelf-hosted6.0Free plan - 11
Deno
Free plan5.9From $20 a month - 12
PHP CS Fixer
PHP CS Fixer is a free Linux and self-hosted tool that detects PHP coding-standard problems and fixes them automatically.
Free planLinuxSelf-hosted5.9Free plan - 13
OCamlFormat
Free planLinux5.8Free plan - 14
clang-format
clang-format is a free, open-source set of tools for formatting source code, available as a standalone command-line program and through editor integrations.
ExtensionLinuxmacOSWindows5.6 - 15
autopep8
APILinuxmacOSWindows5.5 - 16
Dart formatter
LinuxmacOSWindows4.8 - 17
YAPF
LinuxmacOSWindows4.8 - 184.4
- 19
EditorConfig
EditorConfig
4.3 - 20
LuaFormatter
Koihik
4.3 - 21
StyLua
JohnnyMorganz
4.3

