Skip to content

The best Prettier alternatives

6 tools that do a similar job to Prettier, 6 of them open source. Each entry says what it does and who it suits, so you can pick the one that fits instead of the most famous.

You're replacing

Prettier

An opinionated code formatter that rewrites your code in one consistent style.

  1. 1

    ESLint

    Open source · MIT · ★ 27.6k

    A JavaScript linter that finds and reports problematic code patterns, with rules you can configure.

    Best for: JavaScript developers who want automatic checks on their code; Teams that want consistent rules enforced in a shared configuration

  2. 2

    PostCSS

    Open source · MIT · ★ 29k

    A tool that transforms CSS stylesheets using JavaScript plugins.

    Best for: Web developers who want to automate CSS fixes such as vendor prefixes; Teams that want to lint or enforce rules on stylesheets

  3. 3

    esbuild

    Open source · MIT · ★ 40.1k

    A very fast tool that bundles and minifies JavaScript, TypeScript, and CSS for the web.

    Best for: Developers who want fast builds for JavaScript, TypeScript, or CSS projects; Teams using React or other JSX-based frontends

  4. 4

    Mitosis

    Open source · MIT · ★ 14.5k

    Write UI components once in a JSX-like syntax and compile them to many frameworks.

    Best for: Teams maintaining the same UI components across more than one framework; Library authors who want to publish components for several frameworks

  5. 5

    Madge

    Open source · MIT · ★ 10.2k

    Draws a graph of your JavaScript module dependencies and finds circular ones.

    Best for: JavaScript developers untangling a large codebase with many imports; Teams who want to catch circular dependencies before they cause bugs

  6. 6

    Black

    Open source · MIT · ★ 42.1k

    A Python code formatter that rewrites your files to one consistent style with little configuration.

    Best for: Python developers who want formatting handled automatically; Teams that want every project member's code to look the same

How we pick: tools in the same category that solve the same problem, projects that name each other as alternatives, and open-source projects that describe themselves as an alternative to Prettier. We don't take payment for placement.