Black
Input—per 1M tokens
Output—per 1M tokens
Context—tokens
WeightsClosed
About
Black is ranked #4 of 34 in code formatting tools on Inferse. It runs on Linux, macOS, Self-hosted, Windows. There is a free plan.
Compared on code formatting tools
- Free plan
- Yesblack.readthedocs.io
- Supported languages
- Pythonblack.readthedocs.io
- Supported platforms
- Windows, macOS, Linux, local HTTP APIblack.readthedocs.io
- Editor integration
- Yesblack.readthedocs.io
- Ignore files
- Yesblack.readthedocs.io
- Changed-lines formatting
- Yesblack.readthedocs.io
- Library API
- Noblack.readthedocs.io
- License model
- open_sourceblack.readthedocs.io
Facts
- Purpose
- Black is an opinionated formatter for Python code that follows PEP 8.black.readthedocs.io · 28 Sept 2026
- Formatting
- Black reformats whole files in place and uses a default line length of 88 characters.black.readthedocs.io · 28 Sept 2026
- Consistent style
- Black limits style options and aims to make code look consistent across projects.black.readthedocs.io · 28 Sept 2026
- Safety check
- Black checks that reformatted code has an effectively equivalent abstract syntax tree and raises an error if the check fails.black.readthedocs.io · 28 Sept 2026
- Installation
- Black installs with pip and requires Python 3.10 or newer to run.black.readthedocs.io · 28 Sept 2026
- Notebook support
- Jupyter Notebook formatting is available by installing Black with the jupyter extra.black.readthedocs.io · 28 Sept 2026
- Editor integrations
- The documentation describes integrations for editors including PyCharm, Vim, Neovim, Visual Studio Code, and Sublime Text.black.readthedocs.io · 28 Sept 2026
- CI integration
- Black provides a GitHub Actions integration that supports GitHub-hosted runner operating systems.black.readthedocs.io · 28 Sept 2026
- Local server
- Black includes blackd, an HTTP server that binds to localhost by default.black.readthedocs.io · 28 Sept 2026
- Docker
- Official Black Docker images are available, with tags for releases and prereleases.black.readthedocs.io · 28 Sept 2026
- API limit
- Black is fundamentally a command-line tool and does not currently provide a Python interface.black.readthedocs.io · 28 Sept 2026
- License
- Black is licensed under the MIT License.black.readthedocs.io · 28 Sept 2026
- Style stability
- For stable releases, code formatted with a release remains unchanged under other releases in the same calendar year when using the same options.black.readthedocs.io · 28 Sept 2026
- What it does
- Black is an opinionated code formatter that formats Python code with consistent style.black.readthedocs.io · 29 Sept 2026
- Code review
- Black says it can make code review faster by producing the smallest diffs possible.black.readthedocs.io · 29 Sept 2026
- Safety check
- Black checks that reformatted code has a valid AST effectively equivalent to the original and raises an error without changing the file if issues are found.black.readthedocs.io · 29 Sept 2026
- Installation
- Black installs with pip or pipx and requires Python 3.10 or later to run.black.readthedocs.io · 29 Sept 2026
- Notebook support
- Jupyter Notebook formatting is available with the black[jupyter] installation extra.black.readthedocs.io · 29 Sept 2026
- Integrations
- The documentation lists editor and IDE, GitHub Actions, source version control, and doctest formatting integrations.black.readthedocs.io · 29 Sept 2026
- Editor support
- Documented editor integrations include Emacs, PyCharm and IntelliJ IDEA, Vim, Neovim, Visual Studio Code, SublimeText, and others.black.readthedocs.io · 29 Sept 2026
- Command line tool
- Black is fundamentally a command line tool and the documentation says it does not yet provide a Python interface.black.readthedocs.io · 29 Sept 2026
- Configuration limit
- Black provides no option to configure indentation style and says requests for that option will not be considered.black.readthedocs.io · 29 Sept 2026
- Notebook limits
- Black skips notebook cells containing automagics, non-Python or multiline magics, transformed magic code, or invalid syntax.black.readthedocs.io · 29 Sept 2026
- Python compatibility
- Black promises support for Python versions that have not reached end of life, for both running Black and formatting code.black.readthedocs.io · 29 Sept 2026
- License
- Black is licensed under the MIT license.black.readthedocs.io · 29 Sept 2026
Best Black alternatives
See all 12
7.3 autopep8 See plans price on the maker's page
7.2 pgFormatter Free free plan, no paid price published Free plan
7.2 Prettier Free free plan, no paid price published Free plan
6.0 clang-format See plans price on the maker's page
6.0 rustfmt Free free plan, no paid price published Free plan
5.9 Accessibility Test Framework for Android Free free plan, no paid price published Free plan Where it ranks on Inferse
Sources
- black.readthedocs.io/en/stable/the_black_code_style/index.ht· checked 28 Sept 2026
- black.readthedocs.io/en/stable/usage_and_configuration/the_b· checked 28 Sept 2026
- black.readthedocs.io/en/stable/faq.html· checked 28 Sept 2026
- black.readthedocs.io/en/stable/getting_started.html· checked 28 Sept 2026
- black.readthedocs.io/en/stable/integrations/editors.html· checked 28 Sept 2026
- black.readthedocs.io/en/stable/integrations/github_actions.h· checked 28 Sept 2026
- black.readthedocs.io/en/stable/usage_and_configuration/black· checked 28 Sept 2026
- black.readthedocs.io/en/stable/usage_and_configuration/black· checked 28 Sept 2026
- black.readthedocs.io/en/stable/· checked 28 Sept 2026
- black.readthedocs.io/en/stable/integrations/index.html· checked 29 Sept 2026
