prettier VS black

Compare prettier vs black and see what are their differences.

Civic Auth - Auth in Less Than 5 Minutes
Civic Auth comes with multiple SSO options, optional embedded wallets, and user management — all implemented with just a few lines of code. Start building today.
www.civic.com
featured
SurveyJS - JavaScript Form Builder with No-Code UI & Built-In JSON Schema Editor
Add the SurveyJS white-label form builder to your JavaScript app (React/Angular/Vue3). Build complex JSON forms without coding. Fully customizable, works with any backend, perfect for data-heavy apps. Learn more.
surveyjs.io
featured
prettier black
481 339
50,413 40,227
0.4% 0.6%
9.8 8.8
5 days ago about 14 hours ago
JavaScript Python
MIT License MIT License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

prettier

Posts with mentions or reviews of prettier. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2025-04-06.

black

Posts with mentions or reviews of black. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2025-05-07.
  • Nix-Powered Python Development
    6 projects | dev.to | 7 May 2025
    These requirements are not too uncommon. I have seen many projects with similar setup, with alternatives such as tox instead of nox, or black and pylint instead of ruff, etc.
  • Nix Flake Templates
    9 projects | dev.to | 5 May 2025
    Use black and isort for formatting.
  • Ruff and Ready: Linting Before the Party
    5 projects | dev.to | 2 May 2025
    black as a formatter,
  • Amazing `pre-commit` and How To Use It
    3 projects | dev.to | 26 Feb 2025
    repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.4.0 # Use the desired revision hooks: - id: trailing-whitespace - id: end-of-file-fixer - repo: https://github.com/psf/black rev: 23.1.0 # Use the appropriate version for your project hooks: - id: black - repo: https://github.com/pycqa/flake8 rev: 6.0.0 hooks: - id: flake8
  • Ruff: Python linter and code formatter written in Rust
    12 projects | news.ycombinator.com | 20 Jan 2025
    > I appreciate that Black annoyed everyone on our team about the same amount but in different ways.

    If it did affect people equally, it would be great. Unfortunately, spaces for indentation is an accessibility issue and the Black maintainers are hostile to making this configurable. Normally I am in agreement about minimising configurability, but this isn’t a matter of taste, it is making the Python ecosystem more difficult for some disabled people to participate in.

    https://github.com/psf/black/issues/2798

    Fortunately, Ruff makes this configurable, so you don’t have to choose between autoformatting and accessibility any more.

  • Just use this Next.js Eslint Configuration
    8 projects | dev.to | 12 Jan 2025
    XO. This feels like the Black of Typescript linting. XO has styles for everything and is very opinionated. This can be nice, because it takes a lot of code style decisions off of your plate. But beware it can be cumbersome to implement in the middle of a project because it will require extensive reformatting. In lieu of XO, I found Unicorn opinionated enough and more immediately useful.
  • Enhancing Code Quality: Adding Formatters and Linters to Code-Formatter-Advisor
    1 project | dev.to | 1 Nov 2024
    Black (Python Code Formatter) - Black is a widely used opinionated Python code formatter that helps standardize the look of Python code. Its primary advantage is that it eliminates arguments over style, helping teams stay productive.
  • Hacktoberfest 2024: 3rd Contribution
    4 projects | dev.to | 22 Oct 2024
  • Black – The uncompromising Python code formatter
    1 project | news.ycombinator.com | 11 Oct 2024
  • Setting Up a Comprehensive Python Build Validation Pipeline in Azure DevOps
    2 projects | dev.to | 3 Oct 2024
    repos: - repo: https://github.com/psf/black rev: 22.3.0 hooks: - id: black args: [--line-length=79] - repo: https://github.com/PyCQA/isort rev: 5.10.1 hooks: - id: isort - repo: https://github.com/PyCQA/flake8 rev: 4.0.1 hooks: - id: flake8

What are some alternatives?

When comparing prettier and black you can also consider the following projects:

ESLint - Find and fix problems in your JavaScript code.

yapf - A formatter for Python files

JS-Beautifier - Beautifier for javascript

ruff - An extremely fast Python linter and code formatter, written in Rust.

JSHint - JSHint is a tool that helps to detect errors and potential problems in your JavaScript code

autopep8 - A tool that automatically formats Python code to conform to the PEP 8 style guide.

Civic Auth - Auth in Less Than 5 Minutes
Civic Auth comes with multiple SSO options, optional embedded wallets, and user management — all implemented with just a few lines of code. Start building today.
www.civic.com
featured
SurveyJS - JavaScript Form Builder with No-Code UI & Built-In JSON Schema Editor
Add the SurveyJS white-label form builder to your JavaScript app (React/Angular/Vue3). Build complex JSON forms without coding. Fully customizable, works with any backend, perfect for data-heavy apps. Learn more.
surveyjs.io
featured

Did you know that JavaScript is
the 3rd most popular programming language
based on number of references?