Prettier is a free, open-source code formatter that parses code and prints it in a consistent style, taking line length into account.
Best Code Formatting Tools in 2026
Code formatting tools help maintain consistent source code across projects, languages, and development setups. Compared on supported languages and platforms, editor integration, and changed-lines formatting, the entries can be assessed against how you work with code. Ignore-file support and a library API offer additional workflow considerations, while license model, free-plan availability, and paid-from pricing help…
Fourmolu is a configurable formatter for Haskell source code and a fork of Ormolu.
- 46.6Free plan
- 5
Black
Black is a Python code formatter that applies a consistent style while following PEP 8.
Free planLinuxmacOSSelf-hostedWindows6.5Free plan - 6

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

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

Fantomas
Fantomas is an opinionated formatter for F# source code that applies formatting based on configuration.
Free planWebLinuxmacOSWindows6.3Free plan - 11
Laravel Pint
Laravel Pint is an opinionated PHP code style fixer that formats project files consistently.
Free planmacOSSelf-hosted6.3Free plan - 12
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 - 13
goimports
goimports is a free, open-source command-line tool for Go developers.
Free planWebLinuxmacOSWindows6.2Free plan - 14
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 - 15
swift-format
swift-format is a free, Apache-2.0 licensed tool for formatting and linting Swift source code.
Free planiOSLinuxmacOS6.2Free plan - 16
Taplo
Taplo is a toolkit for validating, formatting and querying TOML documents, with support for TOML 1.0.0.
Free planAPIExtensionLinuxmacOS6.2Free plan - 17
dprint
dprint is a command-line application that automatically formats code.
Free planExtensionLinuxmacOSSelf-hosted6.1Free plan - 18
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 - 19
Spotless
Spotless formats source code and can check files for formatting violations or apply fixes.
Free planLinuxmacOSWindows6.1Free plan - 20

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 - 21
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 - 22
gofmt
gofmt is the Go source formatter included with Go installations, available on Linux, macOS, and Windows.
Free planLinuxmacOSWindows6.0Free plan - 23
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 - 24

Scalafmt
Scalafmt is a free, open-source formatter that helps teams apply consistent formatting to Scala code.
Free planLinuxmacOSSelf-hostedWindows6.0Free plan - 25
UglifyJS
UglifyJS is a JavaScript toolkit for parsing, minifying, compressing, and beautifying code.
Free planAPILinuxSelf-hosted5.9Free plan
