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…
Fourmolu is a configurable formatter for Haskell source code and a fork of Ormolu.
- 46.6Free plan
- 5

Ruff
Ruff is a free Python linter and code formatter written in Rust.
Free planWebLinuxmacOSSelf-hosted6.5Free plan - 66.5Free plan
- 7

Biome
Biome is a toolchain for maintaining the health of web projects.
Free planWebExtensionLinuxmacOS6.4Free plan - 86.4Free plan
- 9

Fantomas
Fantomas is an opinionated formatter for F# source code that applies formatting based on configuration.
Free planWebLinuxmacOSWindows6.3Free plan - 10
Laravel Pint
Laravel Pint is an opinionated PHP code style fixer that formats project files consistently.
Free planmacOSSelf-hosted6.3Free plan - 11
Uncrustify
Uncrustify is a free, open-source source code formatter for C, C++, C#, Objective-C, D, Java, Pawn, and Vala.
Free planLinuxmacOSSelf-hostedWindows6.3Free plan - 12
goimports
goimports is a free, open-source command-line tool for Go developers.
Free planWebLinuxmacOSWindows6.2Free plan - 13
pgFormatter
pgFormatter is a free formatter for PostgreSQL queries and PL/pgSQL code, with support for SQL-92, SQL-99, SQL-2003, SQL-2008, SQL-2011, PostgreSQL…
Free planWebAPILinuxSelf-hosted6.2Free plan - 14
swift-format
swift-format is a free, Apache-2.0 licensed tool for formatting and linting Swift source code.
Free planiOSLinuxmacOS6.2Free plan - 15
Taplo
Taplo is a toolkit for validating, formatting and querying TOML documents, with support for TOML 1.0.0.
Free planAPIExtensionLinuxmacOS6.2Free plan - 16
dprint
dprint is a command-line application that automatically formats code.
Free planExtensionLinuxmacOSSelf-hosted6.1Free plan - 17
shfmt
shfmt is a free, open-source formatter for shell programs, included in a project that also provides a shell parser and interpreter.
Free planLinuxmacOSSelf-hostedWindows6.1Free plan - 18
Spotless
Spotless formats source code and can check files for formatting violations or apply fixes.
Free planLinuxmacOSWindows6.1Free plan - 19

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.0Free plan - 20
elm-format
elm-format is a free formatter for Elm source code, applying rules based on the official Elm Style Guide.
Free planLinuxmacOSWindows6.0Free plan - 21
gofmt
gofmt is the Go source formatter included with Go installations, available on Linux, macOS, and Windows.
Free planLinuxmacOSWindows6.0Free plan - 22
js-beautify
js-beautify is a free, open-source tool for reformatting and re-indenting JavaScript, including bookmarklets and packed scripts.
Free planWeb6.0Free plan - 23

Scalafmt
Scalafmt is a free, open-source formatter that helps teams apply consistent formatting to Scala code.
Free planLinuxmacOSSelf-hostedWindows6.0Free plan - 24
UglifyJS
UglifyJS is a JavaScript toolkit for parsing, minifying, compressing, and beautifying code.
Free planAPILinuxSelf-hosted5.9Free plan - 25
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.8Free plan - 26
OCamlFormat
Free planLinux5.7Free plan - 27
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.5 - 28
autopep8
APILinuxmacOSWindows5.4 - 29
stylish-haskell
LinuxWindows5.4 - 30
Dart formatter
LinuxmacOSWindows4.7
