EVERYTHING XIAOMI
Get listed
Prettier logo

Prettier

Prettier is a free, open-source code formatter that parses code and prints it in a consistent style, taking line length into account.

Place
#1 of 34
Score
7.5
Prettier's website

What Prettier is

Prettier is a free, open-source code formatter that parses code and prints it in a consistent style, taking line length into account. Built-in language support includes JavaScript, JSX, Angular, Vue, Flow, TypeScript, CSS, Less, SCSS, HTML, JSON, GraphQL, Markdown, YAML, LWC and MJML. Use its command-line interface with `--write` to format files or `--check` to check formatting in CI. Listed editor integrations include VS Code, Emacs, Vim, Helix, Sublime Text, JetBrains IDEs, Visual Studio and Espresso; formatting can run from an editor shortcut or when saving a file. Prettier has configuration options but keeps them limited. Plugins can add languages or formatting rules, and languages beyond its built-in set require a plugin. For ESLint, its install guide recommends `eslint-config-prettier` to disable rules that are unnecessary or may conflict. The tool supports browser and JavaScript API use as well as Linux, macOS and Windows. Enterprise support and maintenance are available through the Tidelift Subscription.

Good

  • Free and open-source.
  • Supports many web-focused languages by default.
  • Can format files or check them in CI.
  • Integrates with a range of editors.
  • Plugins can add languages or formatting rules.

Watch out

  • Configuration options are intentionally limited.
  • Additional languages require a plugin.
  • Patch releases can format code differently.
  • Enterprise support and maintenance are through Tidelift Subscription.

Who it suits

It suits developers who want consistent code formatting across supported languages and editors. Teams needing additional languages can use plugins, while those using ESLint can follow the documented integration guidance.

Verdict

Prettier provides consistent formatting through command-line, editor and API workflows, with broad built-in language support. Its limited configuration and version consistency guidance are worth considering when adopting it across projects.

Plans and prices

From Prettier's own pricing page, checked 15 Oct 2026.

All about pricing
PlanPriceWhat it gives you
Open-source PrettierFreelocal CLI · editor integrations · browser standalone · JavaScript API · plugins
PrettierFreeOpen-source code formatter; enterprise support and maintenance offered through Tidelift Subscription

The facts

Each one read from Prettier's own pages, with the date it was checked.

Where it runs

Browser build
A standalone browser build runs without Node.js, but it does not support config files, ignore files, CLI behavior or automatic plugin loading.checked 15 Oct 2026
Browser plugin requirement
In the browser build, parser plugins must be loaded and passed explicitly to prettier.format.checked 15 Oct 2026

What it does

Command line
The install guide documents running `prettier --write` to rewrite files and `prettier --check` in CI to detect unformatted files.checked 15 Oct 2026
Community plugins
The plugin directory lists community integrations for languages and formats such as Java, Kotlin, Rust, SQL, Solidity, Svelte, TOML and YAML.checked 15 Oct 2026
Configuration
Configuration can use JSON, YAML, TOML, JavaScript or TypeScript files, with overrides for selected files and directories.checked 15 Oct 2026
Documentation depth
The documentation covers installation, CLI usage, options, configuration, editor setup, CI, plugins, browser use, APIs and technical internals.checked 15 Oct 2026
Editor behavior
Prettier can be run from an editor shortcut or automatically when saving a file.checked 30 Sep 2026
Editor integrations
The official site lists integrations or support for VS Code, WebStorm, Visual Studio, Vim, Emacs, Sublime Text, Nova and Espresso.checked 15 Oct 2026
Enterprise support
Commercial support and maintenance for Prettier are available as part of the Tidelift Subscription.checked 30 Sep 2026
Formatting workflow
Prettier can format files with its CLI using --write or check formatting with --check in CI.checked 30 Sep 2026
Git hooks
The documentation describes using Husky and lint-staged to run Prettier before each commit.checked 30 Sep 2026
IDE integration
JetBrains documentation says IntelliJ IDEA can add Prettier actions when the dependency is installed and notes that TypeScript config files need Node.js 22.6 or later.checked 15 Oct 2026
Languages
Built-in language support includes JavaScript, JSX, Angular, Vue, Flow, TypeScript, CSS, Less, SCSS, HTML, JSON, GraphQL, Markdown, YAML, LWC, and MJML.checked 30 Sep 2026
Latest notable release
Prettier 3.9 was announced on June 27, 2026 with parser upgrades for Markdown, YAML, Flow, GraphQL and Angular plus JavaScript and TypeScript formatting changes.checked 15 Oct 2026
Licence
The repository grants permission to use, copy, modify, distribute, sublicense and sell the software under the MIT licence.checked 15 Oct 2026
Limit: HTML whitespace concerns
A Reddit participant argues that applying line-length formatting to HTML can alter meaningful whitespace and harm intended rendering.checked 15 Oct 2026
Limit: opinionated style
Product Hunt and Reddit discussions identify the fixed, opinionated formatting decisions as a recurring drawback for teams wanting different conventions.checked 15 Oct 2026
Limit: plugin complexity
A Reddit discussion complains that needing multiple plugins can make setup messy and unattractive.checked 15 Oct 2026
Linters
For ESLint integration, the install guide recommends eslint-config-prettier to disable rules that are unnecessary or might conflict with Prettier.checked 30 Sep 2026
Official plugins
Officially listed plugins include PHP, Pug, Ruby and XML support.checked 15 Oct 2026
Option policy
The project says its formatting option set is effectively frozen and that new formatting-option requests are out of scope.checked 15 Oct 2026
Package installation
The current install page shows exact-version installation commands for npm, Yarn, pnpm, Bun and Deno using Prettier 3.9.10.checked 15 Oct 2026
Plugin extensibility
Plugins add languages or formatting rules and can be loaded through the CLI, JavaScript API or configuration files.checked 15 Oct 2026

The company

Maker identity
Product Hunt identifies James Long as the maker and says Prettier launched in 2018; the repository copyright names James Long and contributors.checked 15 Oct 2026
The full review of Prettier

Prettier is a free, open-source formatter for developers who want the same code style applied across editors and project workflows. It is a strong fit for web-focused teams; its small set of configuration options is the main trade-off.

Overview

Prettier parses code and prints it in a consistent style, taking line length into account. That makes formatting less dependent on individual preferences and helps keep shared code uniform. Teams that need extensive control over formatting conventions may find its opinionated approach restrictive.

Key features

Editor and project workflows

Developers can run Prettier from an editor shortcut or format files automatically on save. Documented integrations include VS Code, Emacs, Vim, Helix, Sublime Text, JetBrains IDEs, Visual Studio and Espresso. This makes it practical for teams with different editor preferences, provided each developer sets up an integration.

From the CLI, --write formats files, while --check checks formatting in CI. Husky and lint-staged can run it before commits, helping teams catch formatting differences earlier in the workflow. Prettier also provides a library API and browser support for JavaScript API use.

Language support and customization

Built-in support covers JavaScript, JSX, Angular, Vue, Flow, TypeScript, CSS, Less, SCSS, HTML, JSON, GraphQL, Markdown, YAML, LWC and MJML. Plugins can extend the formatter with languages or rules, but languages outside its built-in web-focused set require a plugin. That breadth is useful for many front-end and web projects, while plugin setup adds work for other languages.

Prettier offers configuration options but deliberately keeps them few. For ESLint integration, its install guidance recommends eslint-config-prettier to turn off rules that are unnecessary or could conflict. The install guide also recommends pinning an exact local version in each project: even patch releases can produce different formatting, so version consistency matters to teams expecting identical output.

Pricing

Prettier is open source and free. The Prettier plan costs free and provides the open-source code formatter. Commercial support and maintenance are available through the Tidelift Subscription, which includes security updates, license verification and intellectual property indemnification. No other paid plan is described.

Platforms

Prettier supports Linux, macOS and Windows, as well as browser and JavaScript API use and editor extensions. It can be used through the CLI, editor integrations or API, giving individuals and teams several ways to fit formatting into their workflow.

Who it's for

Prettier is best suited to developers and teams working in its supported languages who want a shared style enforced in editors, CI or commit workflows. It is less suitable for projects that rely on extensive custom formatting rules or use languages that lack a built-in formatter and plugin support.

Pros and cons

Pros

  • Free and open source: teams can adopt a shared formatter without a software-plan charge.
  • Multiple workflow options: CLI, editor, browser and JavaScript API support can accommodate both individual editing and automated checks.
  • Broad built-in web-language coverage: support spans JavaScript and TypeScript frameworks, stylesheets, markup, data and documentation formats.

Cons

  • Few configuration options: teams with detailed style preferences have less room to tailor output.
  • Plugin dependency for additional languages: languages beyond the built-in set require extra setup.
  • Version pinning matters: patch releases can format differently, so projects need to manage exact local versions for consistent output.

Alternatives

Browse code formatting tools to compare options. Choose dprint if a free, self-managed CLI with extension support is a better fit. Black is a free Python code formatter for teams focused on that language. Biome is another free open-source toolchain for web projects. Ruff may suit Python developers looking for an open-source tool from a maker focused on high-performance Python developer tools. clang-format is another free formatter option. For C# and XML, consider CSharpier, an opinionated free formatter installable as a .NET tool. rustfmt is a free option for Rust. For PHP 7.4–8.5, PHP CS Fixer is available as a free formatter.

Verdict

Choose Prettier if you want a free formatter that applies consistent style across common web languages and fits into editors, CI and commit workflows. Its limited customization is the clearest reason to look elsewhere; teams adopting it should also pin a local version in each project to keep formatting consistent.

Alternatives to Prettier

All alternatives
  1. 1

    Avidemux

    Free planOpen sourceWebLinuxmacOSWindows
    7.3Free plan
  2. 2

    Fourmolu

    Free planWebLinuxWindows
    6.7Free plan
  3. 3

    rustfmt

    Free planLinuxmacOSWindows
    6.6Free plan
  4. 4

    Black

    Free planLinuxmacOSSelf-hostedWindows
    6.5Free plan
  5. 5Ruff logo

    Ruff

    Free planWebLinuxmacOSSelf-hosted
    6.5Free plan
  6. 6

    Zig fmt

    Free planLinuxmacOSWindows
    6.5Free plan