Skip to content
SPECIFICTION
Get listed

Black vs dprint

Black

black.readthedocs.io

dprint

dprint.dev

Side by side

FigureBlackdprint
Price fromFreeFree
Free planYesYes
Free trial——
Open source——
WindowsYesYes
macOSYesYes
LinuxYesYes
Self-hostedYesYes
Plans published11
Spec score · Code Formatting Tools8.7 (#1)8.1 (#7)
Editor integrationsThe documentation describes integrations for editors including PyCharm, Vim, Neovim, Visual Studio Code, and Sublime Text.The installation guide lists Visual Studio Code, IntelliJ and Neovim integrations, with the dprint language-server command usable by other editors.
InstallationBlack installs with pip or pipx and requires Python 3.10 or later to run.The CLI is distributed as a single static binary with no runtime dependencies and can be installed via shell, PowerShell, Scoop, Homebrew, Cargo, npm, uv, mise, asdf or Arch Linux.
LicenseBlack is licensed under the MIT license.The dprint GitHub repository is marked MIT licensed.
PurposeBlack is an opinionated formatter for Python code that follows PEP 8.dprint is a command-line application that automatically formats code.

Plans

Black

  • BlackFree

Black pricing →

dprint

  • Open source dprintFree

dprint pricing →

In their own words

Black

Black is a free, MIT-licensed formatter for Python code that follows PEP 8. It reformats whole files in place and uses a default line length of 88 characters. Its limited style choices are intended to keep code consistent across projects; indentation style cannot be configured. After formatting, Black checks whether the abstract syntax tree remains effectively equivalent and raises an error if the check fails. Install it with pip; it requires Python 3.10 or newer. The documentation lists editor integrations including Emacs, PyCharm, IntelliJ IDEA, Vim, Neovim, Visual Studio Code and Sublime Text, as well as GitHub Actions and doctest workflows. Notebook formatting is available with the jupyter extra, though Black skips cells containing certain magics or invalid syntax. It also includes blackd, an HTTP server that binds to localhost by default. Black is primarily a command-line tool and does not provide a Python interface. Stable releases preserve formatting within the same calendar year when the options match.

Visit black.readthedocs.io

dprint

dprint is a command-line application that automatically formats code through a configurable, pluggable system built with Rust and WebAssembly. Its official and wrapper plugins cover languages and formats including TypeScript, JavaScript, JSON, Markdown, TOML, CSS, Dockerfile, C#, Python, Go, Swift, GraphQL, YAML, PHP, LaTeX, R, and Julia. Project configuration files define plugins, formatting settings, included files, and exclusions. Plugins can be loaded from a URL or file path and pinned or versioned in configuration. The project says dprint formats hundreds of files in milliseconds and enables incremental caching by default. WebAssembly plugins run in a sandbox without network or file-system access, while process plugins are executable files and are not sandboxed. Editor integrations are listed for Visual Studio Code, IntelliJ, and Neovim; the language-server command can also be used by other editors. The CLI is distributed as a static binary with no runtime dependencies, with installation options including shell, PowerShell, Cargo, npm, and Homebrew. It is MIT-licensed and free.

Visit dprint.dev