Instead of Black
Black alternatives
Black is a free formatter for Python that rewrites whole files in place, applies a consistent style with an 88-character default line length, and checks that formatting preserves an effectively equivalent syntax tree. It supports editor integrations, GitHub Actions, Jupyter notebooks with an extra, and a localhost HTTP server. Its fixed approach also sets boundaries: Black does not offer indentation-style configuration or a Python library interface, and it requires Python 3.10 or newer to run.
- 1
Accessibility Test Framework for Android
Free plan AndroidLinuxMac+1Automated accessibility checks in Android apps — It checks accessibility on Android views and nodes rather than formatting Python source.
Free plan Visit site - 2
Fantomas
Free plan LinuxMacWeb+1Configurable formatting for F# — It formats F# files, follows Microsoft's F# style guide by default, and exposes limited configuration through `.editorconfig`.
Open source Visit site - 3
Fourmolu
Free plan LinuxWebWindowsConfigurable formatting for Haskell — It formats Haskell with configurable layout options and offers an interactive browser demo.
Open source Visit site - 4
goimports
Free plan LinuxMacWeb+1Go import cleanup and formatting — It formats Go in gofmt style while adding missing imports and removing unused ones.
Open source Visit site - 5
Ormolu
Free plan LinuxMacWeb+1Fixed-style formatting for Haskell — It formats Haskell with one unconfigurable style and aims for minimal diffs.
Open source Visit site - 6
Prettier
Free plan Open source APIExtensionLinux+4Formatting across built-in web languages — It formats many languages, including JavaScript, TypeScript, CSS, HTML, JSON, and Markdown, with few configuration options.
- 7
Ruff
Free plan LinuxMacSelf-hosted+2Python formatting plus linting and automatic fixes — It combines Python formatting with lint rules, automatic fixes, and a built-in language server.
- 8
CSharpier
Free plan APILinuxMac+1 - 9
autopep8
Free plan APILinuxMac+1 - 10
clang-format
Free plan ExtensionLinuxMac+1 - 11
elm-format
Free plan LinuxMacWindows - 12
gofmt
Free plan LinuxMacWindows - 13
PHP CS Fixer
Free plan LinuxSelf-hosted - 14
RuboCop
Free plan LinuxSelf-hosted - 15
rustfmt
Free plan LinuxMacWindows - 16
Spotless
Free plan LinuxMacWindows - 17
Uncrustify
Free plan LinuxMacSelf-hosted+1 - 18
OCamlFormat
Free plan Linux - 19
swift-format
Free plan iPhoneLinuxMac - 20
Dart formatter
Free plan LinuxMacWindows - 21 5.8 Visit site
- 22 5.6 Visit site
- 23 5.3 Visit site
- 24
Deno
Paid4.5 Visit site - 25
google-java-format
Paid - 26
YAPF
Paid LinuxMacWindows
The alternatives below are not all replacements for Python formatting. Some check Android accessibility, while the others format F#, Haskell, Go, or multiple languages. Language fit should come first; after that, compare how much control you need over formatting, whether import cleanup or lint fixes matter, and which editor, browser, or CI workflows are available. If your project is Python, Ruff is the closest alternative here; for other languages, a switch means choosing a tool built for that codebase rather than Black’s language.