Prettier Config Generator

Toggle Prettier formatting options and get a ready-to-use .prettierrc JSON file, with copy and download.

Formatting Options

.prettierrc

        
package.json Scripts (optional)
"scripts": {
  "format": "prettier --write .",
  "format:check": "prettier --check ."
}
Copied!

Summary

Toggle Prettier formatting options and get a ready-to-use .prettierrc JSON file, with copy and download.

How it works

  1. Toggle semicolons, single quotes, tab usage, and bracket spacing on or off.
  2. Set tab width and print width with the number inputs.
  3. Pick trailing comma style, arrow function parens, and end-of-line format.
  4. The .prettierrc JSON on the right updates automatically as you change options.
  5. Click "Copy" to copy the config, or "Download" to save it as .prettierrc.

Use cases

  • Bootstrap a .prettierrc for a new JavaScript or TypeScript project.
  • Match a team's existing formatting style without guessing option names.
  • Compare tab-based versus space-based indentation before committing.
  • Generate a config to paste into package.json under a "prettier" key.
  • Standardize print width and trailing commas across a monorepo package.
  • Quickly test how ES5 versus all trailing commas look in the JSON output.

Frequently Asked Questions

Last updated: 2026-07-24 · Reviewed by Nham Vu