Skip to the content
Know your tech before you buy it. Makers: get listed from $49/mo

Prettier

prettier.io

  • Free plan
  • Open source
  • Windows
  • macOS
  • Linux
  • Web
  • Browser extension
  • API
  • Self-hosted
8.3 Club score Visit prettier.io

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. From the command line, `--write` formats files and `--check` checks 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 automatically when saving a file. Prettier has configuration options but keeps them limited; plugins can add languages or formatting rules, and languages beyond the built-in set require a plugin. For ESLint, the install guidance recommends `eslint-config-prettier` to disable unnecessary or conflicting rules. The install guide recommends pinning an exact local version in each project because even patch releases can format code differently. Commercial support and maintenance are available through the Tidelift Subscription.

Who it suits

Prettier suits developers and teams that want consistent formatting across supported languages and editor workflows. Projects using languages outside its built-in set will need a plugin.

Good to know, and what to watch

  • Formats code with line length in mind.
  • Offers CLI formatting and CI checks.
  • Integrates with a range of listed editors.
  • Plugins can add languages or formatting rules.
  • Free and open source.
  • Languages beyond the built-in set require a plugin.
  • It intentionally offers few configuration options.
  • Even patch releases can format code differently.

Open-source Prettier

Free

Prettier

Free

Open source

Getting started

  1. Open the Prettier website
  2. Install an exact local version in each project
  3. Add a listed editor integration or use the JavaScript API
  4. Configure the supported options you need
  5. Run the CLI with `--write` or `--check`
  6. Add plugins for languages beyond the built-in set

Limits to check

The free plan is the open-source formatter. Languages beyond the built-in set require plugins, and configuration options are intentionally limited.

The Club's review

Prettier is a free, open-source formatter for developers and teams working across its built-in web-focused languages. It is a strong choice when a project needs one shared style across editors and automated checks, but not when its limited configuration would frustrate teams with detailed style preferences.

Overview

Prettier parses code and prints it in a consistent format, taking line length into account. That shifts routine style decisions from individual contributors to a common tool, which can make shared codebases more predictable. The trade-off is intentional: teams get consistency, not a large set of knobs for preserving personal formatting habits.

It can be used from the command line, integrated into an editor, or accessed through a browser or JavaScript API. Its built-in languages cover JavaScript and related web technologies as well as formats such as JSON, GraphQL, Markdown and YAML. Other languages require a plugin, so projects outside that built-in range should check plugin coverage before standardizing on Prettier.

Key features

Editor and project workflows

Prettier can run from an editor shortcut or automatically when a file is saved. Documented integrations include VS Code, Emacs, Vim, Helix, Sublime Text, JetBrains IDEs, Visual Studio and Espresso. That breadth suits mixed-editor teams, although each contributor still needs an appropriate integration configured.

Its CLI supports --write to format files and --check to verify formatting in CI. Teams can also use Husky and lint-staged to run formatting before commits. These options let projects apply the same style during editing and in shared workflows, rather than relying on contributors to remember a separate cleanup pass.

Language support and configuration

Built-in support spans JavaScript, JSX, Angular, Vue, Flow, TypeScript, CSS, Less, SCSS, HTML, JSON, GraphQL, Markdown, YAML, LWC and MJML. Plugins can extend that set with languages or formatting rules, but extra coverage means an additional installation rather than an out-of-the-box capability.

Prettier describes itself as opinionated and offers few configuration options. That is an advantage for teams seeking a common default; it is a limitation for organizations that need their formatter to encode many house-style rules. For ESLint projects, the install guidance recommends eslint-config-prettier to turn off rules that are unnecessary or could conflict with formatting.

One operational detail matters for teams: Prettier recommends installing an exact local version in each project because even patch releases can produce different formatting. Pinning the version helps contributors and automated checks use the same output, but it adds a small maintenance step when a project chooses to upgrade.

Pricing

Prettier is open source and free. The Prettier plan costs free and provides the open-source code formatter, with no paid feature tiers described. Teams that want commercial support and maintenance can obtain them through the Tidelift Subscription; its enterprise offering includes security updates, license verification and intellectual property indemnification.

The free formatter fits individuals and teams able to manage installation and version consistency themselves. The Tidelift option is the relevant route for organizations seeking those support and security-related services, rather than a different formatter feature set.

Platforms

Prettier supports Linux, macOS and Windows, along with browser and JavaScript API use and editor extensions. That mix covers local development as well as browser-based or programmatic integration; editor behavior depends on using one of its integrations.

Who it's for

Prettier is best suited to developers and teams maintaining JavaScript or other supported web-oriented projects who want formatting handled consistently in editors, commits or CI. It is also a practical fit for teams using different editors, provided everyone can adopt the relevant integration and the project pins a shared version.

Look elsewhere if a project depends on a language outside Prettier's built-in set and lacks a suitable plugin, or if its style policy calls for extensive formatter customization. Its limited options are part of the product's value, but they are also a firm boundary.

Pros and cons

  • Consistent formatting across common workflows: editor, CLI, CI and pre-commit use can apply the same style at different points in development.
  • Broad built-in web-language coverage: support for JavaScript, TypeScript, CSS, HTML, Markdown and other common formats reduces the need for separate formatters in those projects.
  • Free and open source: teams can use the formatter without a software subscription.
  • Limited style control: its opinionated approach can rule it out for teams that need extensive customization.
  • Version pinning is important: even patch releases can format code differently, so projects need to manage an exact local version.
  • Additional languages require plugins: projects outside the built-in set need extra setup and should confirm a plugin meets their needs.

Alternatives

Choose Scalafmt for Scala formatting; its free plan is a code formatter for Scala and supports Linux, macOS, Windows and self-hosting. Choose Taplo if you need its free formatter across API, extension and desktop platforms. Consider Biome for an open-source toolchain for web projects, also free and available across extensions, web and desktop platforms.

For a language-specific formatter, Black is a free MIT-licensed Python code formatter, while gofmt is a free command-line executable included in the Go installation. rustfmt is another free option. Choose CSharpier for opinionated C# and XML formatting, installable as a .NET tool. Accessibility Test Framework for Android is another listed alternative.

Browse Code Formatting Tools for more options.

Verdict

Choose Prettier if your team wants a free, shared formatter for supported web languages that can run in editors and project checks. Its broad integrations and workflow options make consistent formatting straightforward to adopt; its limited configuration and need to pin versions are the reasons to choose a different tool.

The verdict

Prettier provides a consistent formatting workflow across a broad built-in language set and common editors. Teams should pin an exact local version per project and account for its limited configuration options.

Questions people ask

Is Prettier free?

Yes. Prettier is free and open source, with a listed plan price of free.

Which languages does Prettier support?

Built-in support includes JavaScript, JSX, Angular, Vue, Flow, TypeScript, CSS, Less, SCSS, HTML, Ember/Handlebars, JSON, GraphQL, Markdown, GFM, MDX v1, YAML, LWC and MJML.

Can Prettier run in editors?

Yes. Integrations are listed for VS Code, Emacs, Vim, Helix, Sublime Text, JetBrains IDEs, Visual Studio and Espresso. It can run from a shortcut or on save.

Can Prettier check formatting in CI?

Yes. Use the command-line `--check` option to check formatting, while `--write` formats files.

Does Prettier support plugins?

Yes. Plugins can add languages or formatting rules. Languages outside the built-in set require a plugin.

Is enterprise support available?

Commercial support and maintenance are available through the Tidelift Subscription, which includes security updates, license verification and intellectual property indemnification.

What the maker publishes

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. source
Browser plugin requirement
In the browser build, parser plugins must be loaded and passed explicitly to prettier.format. source
Command line
The install guide documents running `prettier --write` to rewrite files and `prettier --check` in CI to detect unformatted files. source
Community plugins
The plugin directory lists community integrations for languages and formats such as Java, Kotlin, Rust, SQL, Solidity, Svelte, TOML and YAML. source
Configuration
Prettier provides configuration options, but describes itself as opinionated and having few options. source
Configuration
Configuration can use JSON, YAML, TOML, JavaScript or TypeScript files, with overrides for selected files and directories. source
Documentation depth
The documentation covers installation, CLI usage, options, configuration, editor setup, CI, plugins, browser use, APIs and technical internals. source
Editor behavior
Prettier can be run from an editor shortcut or automatically when saving a file. source
Editor integrations
The documentation lists integrations for VS Code, Emacs, Vim, Helix, Sublime Text, JetBrains IDEs, Visual Studio, and Espresso. source
Editor integrations
The official site lists integrations or support for VS Code, WebStorm, Visual Studio, Vim, Emacs, Sublime Text, Nova and Espresso. source
Enterprise support
Commercial support and maintenance for Prettier are available as part of the Tidelift Subscription. source
Formatting workflow
Prettier can format files with its CLI using --write or check formatting with --check in CI. source
Git hooks
The documentation describes using Husky and lint-staged to run Prettier before each commit. source
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. source
Languages
Built-in language support includes JavaScript, JSX, Angular, Vue, Flow, TypeScript, CSS, Less, SCSS, HTML, JSON, GraphQL, Markdown, YAML, LWC, and MJML. source
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. source
Licence
The repository grants permission to use, copy, modify, distribute, sublicense and sell the software under the MIT licence. source
Limit: HTML whitespace concerns
A Reddit participant argues that applying line-length formatting to HTML can alter meaningful whitespace and harm intended rendering. source
Limit: opinionated style
Product Hunt and Reddit discussions identify the fixed, opinionated formatting decisions as a recurring drawback for teams wanting different conventions. source
Limit: plugin complexity
A Reddit discussion complains that needing multiple plugins can make setup messy and unattractive. source
Linters
For ESLint integration, the install guide recommends eslint-config-prettier to disable rules that are unnecessary or might conflict with Prettier. source
Maker identity
Product Hunt identifies James Long as the maker and says Prettier launched in 2018; the repository copyright names James Long and contributors. source
Official plugins
Officially listed plugins include PHP, Pug, Ruby and XML support. source
Option policy
The project says its formatting option set is effectively frozen and that new formatting-option requests are out of scope. source

Checked against the maker's pages on 15 Oct 2026.