Free and open first
Best Code formatters in 2026
Code formatters help standardize source-code layout. This list is for people choosing a formatter for a personal project, team workflow or development setup on a budget.
- 22 apps
- Research read 23 Oct 2026
- How the order is worked out
- 1
Prettier
Free plan Open source APIExtensionLinux+4Prettier offers a consistent formatting workflow through its CLI, editor integrations, and API. Its limited configuration and plugin requirement for additional languages are worth considering.
- 2
Black
Free plan LinuxMacSelf-hosted+1Black is a focused Python formatter with editor and automation integrations, plus a check that reformatted code remains effectively equivalent.
- 3
CSharpier
Free plan APILinuxMac+1CSharpier provides an opinionated way to format C# and XML across common development workflows.
- 4
autopep8
Free plan APILinuxMac+1autopep8 offers configurable PEP 8 formatting across major desktop platforms and can be used from commands, hooks, or Python code. Review aggressive changes carefully because some can affect meaning.
- 5
clang-format
Free plan ExtensionLinuxMac+1clang-format offers broad language coverage and several ways to apply formatting, from editors to staged Git changes.
- 6
elm-format
Free plan LinuxMacWindowselm-format offers a free way to apply consistent formatting to Elm source code, with command-line and editor workflows. Its scope is focused on Elm rather than multiple languages.
- 7
gofmt
Free plan LinuxMacWindowsgofmt provides a focused way to format Go source, with options for checking differences and applying transformations.
- 8
Ruff
Free plan LinuxMacSelf-hosted+2Ruff combines Python linting, formatting and fixes, with integrations for common editors and CI workflows.
- 9
PHP CS Fixer
Free plan LinuxSelf-hostedPHP CS Fixer offers automatic formatting alongside a reporting-only mode, with configurable styles and editor and CI options.
- 10
RuboCop
Free plan LinuxSelf-hostedRuboCop provides configurable Ruby linting, formatting, editor integration, and CI reporting at no cost. Its plugin and autocorrection options support both new projects and legacy codebases.
- 11
rustfmt
Free plan LinuxMacWindowsrustfmt covers common Rust formatting workflows, including Cargo, editor use, and CI.
- 12
Spotless
Free plan LinuxMacWindowsChoose Spotless if you need an open-source formatter that can check and fix code across multiple languages and build systems.
- 13
Uncrustify
Free plan LinuxMacSelf-hosted+1Uncrustify offers extensive formatting controls and command-line processing across several languages.
- 14
OCamlFormat
Free plan LinuxOCamlFormat combines project-level formatting settings with integrations for Dune and other tools. Check its OCaml and Dune requirements before adding it to a project.
- 15
swift-format
Free plan iPhoneLinuxMacChoose swift-format for a free, Apache-2.0 tool that formats and lints Swift with command-line, plugin, API, and editor integration options.
- 16
Dart formatter
Free plan LinuxMacWindows - 17 5.8 Visit site
- 18 5.6 Visit site
- 19 5.3 Visit site
- 20
Deno
Paid4.5 Visit site - 21
google-java-format
Paid - 22
YAPF
Paid LinuxMacWindows
#1Places #1, #2, #3, #4, #5 on this list can be bought by the makers of the software on it. See the price
Compare free plans, free trials and open-source licences before choosing. Check the supported language, platform and integration style you need, such as Linux, macOS, Windows, self-hosted use, an API or an extension.
Questions
Can I use a code formatter for free?
Yes. The list includes tools with free plans, such as autopep8, Black, clang-format, gofmt and LuaFormatter. Check the listed pricing details for the tool you want.
Are open-source code formatters listed?
Yes. CSharpier and google-java-format are marked open source. Review a tool's licence if you need to inspect or modify its code.
Do code formatters offer free trials?
A free trial is available from tools on this list. Check the individual listing for trial terms before signing up.
Which platforms can these tools use?
Platform options represented here include Linux, macOS, Windows, self-hosted use, APIs and extensions. Confirm the platform for the specific tool.
Does google-java-format support Java?
Yes. google-java-format is listed with Java as a supported language.
More in Developer Tools
- ETL and ELT Tools18
- Search & Vector Database Platforms20
- Serverless Computing Platforms19
- Online code documentation and reference sites15
- Feature Flag & Experimentation Platforms17
- Code Metrics Tools15
- Load Testing Software16
- Package Management Software16
- Web Scraping Software16
- Programming fonts14
- Data Observability Tools13
- Search Engine Software11