Prettier
An opinionated code formatter for JavaScript, TypeScript, CSS, HTML, Markdown and other languages.
These buttons open the developer's own site, repository or store listing in a new tab. wares.gg does not host downloads.
1 more ways to get Prettier
Package managers
- Homebrew
brew install prettier
About Prettier
Prettier reformats source code to a consistent style with few configuration options, so style no longer needs discussing in code review. It is usually set up to format files on save.
It supports JavaScript, JSX, TypeScript, JSON, CSS, SCSS, Less, HTML, Vue, Angular, YAML, Markdown and GraphQL, with community plugins for languages such as Java, PHP, Ruby, Rust and XML. Integrations exist for VS Code, Vim, Emacs, Sublime Text and others, and it can be tried online.
Strengths
- Consistent formatting with very little configuration
- Wide language support with community plugins
- Integrations for most editors
- Online playground to try it
Limitations
- Few options, so it may not match an existing house style
- Some languages depend on community plugins
Details
- Pricing
- FreeFree and open source; an enterprise support offering is available.
- License
- MIT
- Developer
- The Prettier contributors
- Platforms
- Web, Command line
- How it runs
- Downloadable app, Web application
- Account
- Not required
- Works offline
- Yes
- Best suited for
- Web development teams who want consistent formatting without style debates
- Categories
- Developer tools
- Last verified
- Added
- Provenance
- Facts checked against the developer's own pages and store listings, 1 sources on file.
Alternatives to Prettier
Compare allSoftware that can replace Prettier for an important use case, and what changes if you switch.
Biome
A fast formatter and linter for JavaScript, TypeScript, JSON, CSS, HTML and GraphQL in one tool.
Biome combines a formatter with a linter of over 500 rules in one fast tool, stays close to Prettier output, but some formatting differs and language coverage is narrower.
Prettier as an alternative
Listings that name Prettier as an alternative.
yamlfmt
Format YAML files consistently from the command line.
Prettier is an opinionated MIT-licensed formatter covering many languages beyond YAML, including JavaScript, CSS and Markdown, with few configuration options and wide editor integration.
Similar software
Related functionality, not necessarily a direct replacement.
ESLint
A pluggable linter that finds and automatically fixes problems in JavaScript and JSX code.
pre-commit
A command-line framework for managing and running multi-language Git pre-commit hooks across projects.
Ruff
Lint and format Python code with one fast command-line tool.
gofumpt
Apply a stricter, consistent formatting style to Go code.
shfmt
Apply consistent formatting to shell scripts.