Prettier
prettier.io
What it is
Prettier is an open-source code formatter that parses source files and prints them in a consistent style while accounting for line length. Its built-in languages include JavaScript, JSX, Angular, Vue, Flow, TypeScript, CSS, Less, SCSS, HTML, JSON, GraphQL, Markdown, YAML, LWC, and MJML. The command-line interface can write formatted files with --write or check formatting with --check in continuous integration. Listed editor integrations include VS Code, Emacs, Vim, Helix, Sublime Text, JetBrains IDEs, Visual Studio, and Espresso; formatting can run from a shortcut or on save. Prettier has configuration options but keeps them limited. Plugins can add languages and formatting rules, and languages outside the built-in set require a plugin. For ESLint integration, the installation guidance recommends eslint-config-prettier to disable rules that are unnecessary or may conflict. Prettier supports browser and JavaScript API use, along with Linux, macOS, and Windows. The listed plan is free. Commercial support and maintenance are available through the Tidelift Subscription.
Spec sheet
- What it does
- Prettier parses source code and prints it back in a consistent style, wrapping lines to fit the configured maximum width.Read 15 Oct 2026 · github.com
- 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.Read 15 Oct 2026 · prettier.io
- Browser plugin requirement
- In the browser build, parser plugins must be loaded and passed explicitly to prettier.format.Read 15 Oct 2026 · prettier.io
- Command line
- The install guide documents running `prettier --write` to rewrite files and `prettier --check` in CI to detect unformatted files.Read 15 Oct 2026 · prettier.io
- Community plugins
- The plugin directory lists community integrations for languages and formats such as Java, Kotlin, Rust, SQL, Solidity, Svelte, TOML and YAML.Read 15 Oct 2026 · prettier.io
- Configuration
- Configuration can use JSON, YAML, TOML, JavaScript or TypeScript files, with overrides for selected files and directories.Read 15 Oct 2026 · prettier.io
- Documentation depth
- The documentation covers installation, CLI usage, options, configuration, editor setup, CI, plugins, browser use, APIs and technical internals.Read 15 Oct 2026 · prettier.io
- Editor behavior
- Prettier can be run from an editor shortcut or automatically when saving a file.Read 30 Sep 2026 · prettier.io
- Editor integrations
- The official site lists integrations or support for VS Code, WebStorm, Visual Studio, Vim, Emacs, Sublime Text, Nova and Espresso.Read 15 Oct 2026 · prettier.io
- Enterprise support
- Commercial support and maintenance for Prettier are available as part of the Tidelift Subscription.Read 30 Sep 2026 · prettier.io
- Formatting workflow
- Prettier can format files with its CLI using --write or check formatting with --check in CI.Read 30 Sep 2026 · prettier.io
- Git hooks
- The documentation describes using Husky and lint-staged to run Prettier before each commit.Read 30 Sep 2026 · prettier.io
- 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.Read 15 Oct 2026 · jetbrains.com
- Languages
- Built-in language support includes JavaScript, JSX, Angular, Vue, Flow, TypeScript, CSS, Less, SCSS, HTML, JSON, GraphQL, Markdown, YAML, LWC, and MJML.Read 30 Sep 2026 · prettier.io
- 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.Read 15 Oct 2026 · prettier.io
- Licence
- The repository grants permission to use, copy, modify, distribute, sublicense and sell the software under the MIT licence.Read 15 Oct 2026 · github.com
- Limit: HTML whitespace concerns
- A Reddit participant argues that applying line-length formatting to HTML can alter meaningful whitespace and harm intended rendering.Read 15 Oct 2026 · reddit.com
- Limit: opinionated style
- Product Hunt and Reddit discussions identify the fixed, opinionated formatting decisions as a recurring drawback for teams wanting different conventions.Read 15 Oct 2026 · reddit.com
- Limit: plugin complexity
- A Reddit discussion complains that needing multiple plugins can make setup messy and unattractive.Read 15 Oct 2026 · reddit.com
- Linters
- For ESLint integration, the install guide recommends eslint-config-prettier to disable rules that are unnecessary or might conflict with Prettier.Read 30 Sep 2026 · prettier.io
- Maker identity
- Product Hunt identifies James Long as the maker and says Prettier launched in 2018; the repository copyright names James Long and contributors.Read 15 Oct 2026 · producthunt.com
- Official plugins
- Officially listed plugins include PHP, Pug, Ruby and XML support.Read 15 Oct 2026 · prettier.io
- Option policy
- The project says its formatting option set is effectively frozen and that new formatting-option requests are out of scope.Read 15 Oct 2026 · prettier.io
- Package installation
- The current install page shows exact-version installation commands for npm, Yarn, pnpm, Bun and Deno using Prettier 3.9.10.Read 15 Oct 2026 · prettier.io
- Plugin extensibility
- Plugins add languages or formatting rules and can be loaded through the CLI, JavaScript API or configuration files.Read 15 Oct 2026 · prettier.io
- Plugins
- Plugins can add languages or formatting rules; languages beyond the built-in web-focused languages require installing a plugin.Read 30 Sep 2026 · prettier.io
- Praise: consistent formatting
- Product Hunt reviewers repeatedly say Prettier keeps code clean and readable, reduces style debates and lets developers stop thinking about formatting.Read 15 Oct 2026 · producthunt.com
- Praise: easy setup
- A Product Hunt reviewer praised its no-configuration approach and defaults that teams can readily share.Read 15 Oct 2026 · producthunt.com
- Public API
- The asynchronous JavaScript API exposes format, check, formatWithCursor, configuration-resolution, file-information and support-information functions.Read 15 Oct 2026 · prettier.io
- Rating on Product Hunt
- 4.6 out of 5 from 5 reviewsRead 15 Oct 2026 · producthunt.com
- Removed API
- The custom parser API was removed in version 3.0 and replaced by the plugin API.Read 15 Oct 2026 · prettier.io
- Repository activity
- GitHub identifies the project as public, with about 52.4k stars, 5.0k forks and more than 11,999 commits when accessed.Read 15 Oct 2026 · github.com
- Security and licensing
- The enterprise page says the Tidelift Subscription includes security updates, license verification, and intellectual property indemnification.Read 30 Sep 2026 · prettier.io
- Supported languages
- Built-in language coverage includes JavaScript, JSX, Flow, TypeScript, JSON, CSS, SCSS, Less, HTML, Vue, Angular, Ember/Handlebars, GraphQL, Markdown, YAML, LWC and MJML.Read 15 Oct 2026 · prettier.io
- Synchronous API
- The documentation points developers to the separate @prettier/sync package when synchronous calls are required.Read 15 Oct 2026 · prettier.io
- System requirement
- Prettier 3 requires Node.js 14 or newer, while TypeScript configuration files require Node.js 22.6 or newer.Read 15 Oct 2026 · prettier.io
- Technical design
- Its printer converts an AST into an intermediate representation that measures output and inserts breaks when content does not fit the line.Read 15 Oct 2026 · prettier.io
- Version consistency
- The install guide recommends installing an exact local version in each project because even patch releases can format code differently.Read 30 Sep 2026 · prettier.io
- Version pinning
- Prettier warns that even patch releases can change formatting and recommends pinning an exact local version in package.json.Read 15 Oct 2026 · prettier.io
- VS Code extension
- The Microsoft marketplace extension uses a project-local Prettier when available, bundles Prettier 3.x otherwise and supports locally resolved plugins.Read 15 Oct 2026 · marketplace.visualstudio.com
- VS Code trust behavior
- In an untrusted VS Code workspace, the extension restricts itself to its bundled Prettier and does not load local, global or plugin modules.Read 15 Oct 2026 · marketplace.visualstudio.com
Plans and prices
Strong points and limits
Strong points
- Formats code consistently with line length in mind
- Can check formatting in continuous integration
- Lists integrations for many editors
- Supports browser and JavaScript API use
- Open-source plan costs nothing
Limits
- Configuration options are intentionally limited
- Additional languages require plugins
- Patch releases can format code differently
Who it suits
Prettier suits developers who want consistently formatted code in editors or automated command-line and CI workflows. Teams working with languages beyond its built-in set need to install plugins.
Prettier in depth
Read the full write-up
Prettier is an open-source code formatter for developers who want consistent formatting across supported languages without maintaining a large set of style rules. It is a strong fit for shared projects that can accept its opinions; teams needing fine-grained control should look elsewhere.
Overview
Prettier parses code and prints it in a consistent style, taking line length into account. That makes routine formatting less dependent on individual preferences, which is useful when a team wants code to follow one standard. Its opinionated approach and small number of configuration options are the cost: it is not designed to accommodate extensive style customization.
It can be used through a command-line interface, editor integrations, a browser, or a JavaScript API. The supported platform range also includes Linux, macOS, and Windows, giving teams several ways to fit it into their development workflow.
Key features
Broad language coverage
Built-in support includes JavaScript, JSX, Angular, Vue, Flow, TypeScript, CSS, Less, SCSS, HTML, JSON, GraphQL, Markdown, YAML, LWC, and MJML. The supported-language set also includes Ember/Handlebars, GFM, and MDX v1. This breadth makes Prettier a practical shared formatter for many web-focused projects. Languages beyond its built-in set require a plugin, which means extra setup rather than immediate coverage.
Editors and automated workflows
Prettier can run from an editor shortcut or automatically when a file is saved. Documented integrations cover VS Code, Emacs, Vim, Helix, Sublime Text, JetBrains IDEs, Visual Studio, and Espresso. That range can support teams with different editor preferences, though each developer must use an appropriate integration.
On the command line, --write formats files and --check checks formatting in CI. Husky and lint-staged can run it before commits. These options let teams apply the same style during editing and in project checks, rather than relying on developers to remember to format manually.
Configuration and compatibility
Prettier offers configuration options but deliberately keeps them limited. For projects using ESLint, its install guide recommends eslint-config-prettier to turn off lint rules that are unnecessary or may conflict with formatting. This is a useful way to keep the tools from working at cross-purposes, but it adds a setup step.
Version consistency needs attention: even patch releases can format code differently. The install guide recommends pinning an exact local version in each project, so contributors and automated checks use the same formatter version. Teams that update it should account for potential formatting changes in their codebase.
Pricing
The Prettier plan costs free and provides the open-source code formatter. There is no paid formatter tier described; commercial support and maintenance are available through the Tidelift Subscription. For teams that only need the formatter, the free plan covers the core product. Organizations seeking commercial support can consider the subscription, which includes security updates, license verification, and intellectual property indemnification.
Platforms
Prettier is supported on Linux, macOS, and Windows, with browser and JavaScript API use also supported. Editor integration, a library API, and ignore-file support provide additional ways to incorporate it into a project. The platform range is useful for mixed-OS teams, while the browser and API options suit workflows that call the formatter programmatically.
Who it's for
Prettier suits developers and teams working in its supported languages who want formatting decisions applied consistently across editors, commits, and CI. It is particularly appropriate for web-focused projects that value shared style over individual preferences. It is less suitable for teams that need many configurable formatting rules or work in a language that requires a plugin they do not want to install.
Pros and cons
Broad built-in support: covers a substantial set of web languages, so many projects can adopt it without adding language plugins.
Fits local and automated workflows: editor integrations, CLI formatting, CI checks, and commit hooks offer several points to enforce a common style.
Free and open source: the formatter itself has no purchase cost.
Limited customization: its opinionated design is a drawback for teams that need precise control over formatting conventions.
Output can vary by version: even patch releases may format code differently, making exact project-level version pinning important.
Some languages need plugins: support beyond the built-in web-focused set requires additional installation.
Alternatives
Code Formatting Tools is a broader starting point for comparing formatters. Choose Black for a free Python code formatter, or rustfmt for a free formatter available on Linux, macOS, and Windows. Biome is another free open-source toolchain for web projects, while gofmt is a free command-line formatter included with a Go installation.
For Scala, Scalafmt is a free code formatter; for TOML, Taplo is a free option with API and editor platforms. Uncrustify is a free GPL-2.0-licensed source code formatter. Accessibility Test Framework for Android is another free tool, hosted in Google's public GitHub organization under that repository name.
Verdict
Choose Prettier if you want a free, open-source formatter that can keep supported code styles consistent across editors and automated project checks. Its broad language coverage and workflow flexibility make it a strong choice for web-focused teams. Look elsewhere if your project depends on extensive formatting customization, or be prepared to pin an exact version and install plugins where built-in support does not cover your language.
Verdict
Prettier offers formatting across a broad built-in language set and integrates with editors and CI workflows. Its limited configuration and version-specific output are worth accounting for in project setup.
Where Specifiction places it
- Code Formatting Tools#2 of 348.5