Prettier Config Generator
Toggle Prettier formatting options and get a ready-to-use .prettierrc JSON file, with copy and download.
Use the Prettier Config Generator
Formatting Options
.prettierrc
package.json Scripts (optional)
"scripts": {
"format": "prettier --write .",
"format:check": "prettier --check ."
}
Copied!
Summary
Build a Prettier configuration file without memorizing every option name. Toggle semicolons, quote style, tab width, print width, trailing commas, bracket spacing, arrow parens, and line endings, and watch the .prettierrc JSON update as you go. Copy it straight into your editor or download the file and drop it in your project root.
How it works
- Toggle semicolons, single quotes, tab usage, and bracket spacing on or off.
- Set tab width and print width with the number inputs.
- Pick trailing comma style, arrow function parens, and end-of-line format.
- The .prettierrc JSON on the right updates automatically as you change options.
- 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-09-09 · Reviewed by Nham Vu