Tools · SPBoucher
Menu

Prettier

by Prettier project · CLI tool

Opinionated code formatter for JavaScript, TypeScript, CSS, HTML, Markdown, YAML and more that reprints code from its syntax tree with few options

MIT licenseOpen sourceFreeLocalCloudSelf-hostable
Visit official site Compare

Link verified Nov 2, 2026

Overview

Prettier is an open-source code formatter started by James Long and maintained by a community under the MIT license. Instead of applying style rules to existing text, it parses a file into a syntax tree and prints it back out according to a fixed layout algorithm, so formatting debates are settled by the tool rather than by configuration. It supports JavaScript, TypeScript, JSX, CSS and SCSS, HTML, Vue, JSON, GraphQL, Markdown and YAML, with plugins for other languages.

Prettier is usually run on save through an editor extension and enforced in CI with a check mode or a pre-commit hook; its small option set (print width, quotes, semicolons, trailing commas and a few others) is deliberate. Limitations follow from that design: users cannot tune most layout decisions, formatting large repositories is slower than Rust-based alternatives, and it does not detect code problems, which is left to a linter such as ESLint or Biome.

Capabilities

  • Deterministic formatting from the syntax tree
  • Support for JavaScript, TypeScript, CSS, HTML, Markdown, YAML and more
  • Editor integration with format-on-save
  • Check mode for CI
  • Plugin API for additional languages

Typical workflows

  1. Format on save and verify in CI
  2. Normalize a legacy codebase in a single commit
  3. Pair with ESLint through eslint-config-prettier

Strengths

  • Ends style discussions with a single canonical output
  • Broad language coverage
  • MIT license

Limitations

  • Few configuration options by design
  • Slower than Rust-based formatters on large trees
  • Formats only; does not lint

Prerequisites

  • Node.js and a package manager

Who it is for

  • Web developers
  • Teams standardizing code style

Alternatives & comparison

Biome implements a Prettier-compatible formatter in Rust together with a linter, so it is the usual drop-in replacement when speed matters. ESLint handles correctness rather than layout and is complementary to Prettier.

  • Biome

    Rust-based formatter and linter for JavaScript, TypeScript, JSX, JSON, CSS and GraphQL that replaces Prettier and ESLint with one binary

    Open sourceOpen source
  • ESLint

    Pluggable static analysis tool for JavaScript and TypeScript that finds problems in code through configurable rules and can fix many automatically

    Open sourceOpen source
Compare Prettier with its alternatives →

Sources & verification

Primary sources consulted for this record. Claims are tied to the fields each source supports; the automated link checker re-verifies every URL on a schedule.

Confidence
High
Reviewed
Nov 1, 2026
Links
Verified · Nov 2, 2026

Spotted an error?

Broken link, outdated license, wrong category, or a tool that no longer exists? Tell us; reports are reviewed by the editor.

Playwright

Microsoft · Testing & QA

In-depth entry

Microsoft's browser automation and end-to-end testing framework driving Chromium, Firefox and WebKit from one API in TypeScript, Python, Java and .NET

Apache-2.0Open sourceFreeLocalSelf-hostedNov 2, 2026

Puppeteer

Google (Chrome DevTools team) · Data collection & crawling

In-depth entry

Node.js library from the Chrome team for controlling Chrome and Firefox over the DevTools Protocol or WebDriver BiDi, used for scraping, screenshots, PDFs and testing

Apache-2.0Open sourceFreeLocalSelf-hostedNov 2, 2026

Cypress

Cypress.io · Testing & QA

End-to-end and component testing framework that runs tests inside the browser with an interactive runner, paired with the commercial Cypress Cloud

MITOpen sourceFreeLocalNov 2, 2026

Vitest

VoidZero / Vitest team · Testing & QA

Vite-native unit test framework for JavaScript and TypeScript with a Jest-compatible API, watch mode, coverage and browser mode

MITOpen sourceFreeLocalNov 2, 2026

Semgrep

Semgrep, Inc. · Security tools

Static analysis engine that matches code patterns written in the target language's own syntax, with an LGPL community edition and a commercial AppSec platform

LGPL-2.1-onlyOpen sourceFreemiumLocalNov 2, 2026

Jest

OpenJS Foundation · Testing & QA

JavaScript testing framework created at Meta with built-in assertions, mocking, snapshot testing and parallel test execution

MITOpen sourceFreeLocalNov 2, 2026