.prettierrc Generator

Generate a .prettierrc configuration file for Prettier. Set print width, quotes, semicolons, trailing commas, and more. Includes Airbnb, Google, and Standard JS presets.

Style Preset
Formatting

printWidth

Max line length before wrapping

80

tabWidth

Spaces per indentation level

2
Quotes

quoteProps

When to quote object property names

Commas & Brackets

trailingComma

Add trailing commas where valid

arrowParens

Parens around single arrow function parameter

Misc

endOfLine

Line ending style

proseWrap

Markdown prose wrapping

.prettierrc
{
  "printWidth": 80,
  "tabWidth": 2,
  "useTabs": false,
  "semi": true,
  "singleQuote": false,
  "quoteProps": "as-needed",
  "jsxSingleQuote": false,
  "trailingComma": "all",
  "bracketSpacing": true,
  "bracketSameLine": false,
  "arrowParens": "always",
  "endOfLine": "lf",
  "singleAttributePerLine": false,
  "proseWrap": "preserve"
}

When a .prettierrc generator is the right tool

Use this page to assemble a JSON .prettierrc from common Prettier options. Pick a preset or toggle the controls; the file updates as you go. To format JavaScript itself, use JavaScript Formatter.

Use cases

Starting from Prettier’s defaults

The Prettier Defaults preset (and the initial state) matches the values shown below. Download writes the JSON as .prettierrc with no extra extension.

Applying a short style overlay

Airbnb, Google, and Standard JS only change the options listed in the FAQ. Everything else stays at the default set. Review the JSON before you commit it; those names are labels, not certifications.

How the file is built

Every key in the form is serialized with JSON.stringify at 2-space indent. Turning a toggle off still emits false rather than omitting the key.

Example — the Prettier Defaults output
{
  "printWidth": 80,
  "tabWidth": 2,
  "useTabs": false,
  "semi": true,
  "singleQuote": false,
  "quoteProps": "as-needed",
  "jsxSingleQuote": false,
  "trailingComma": "all",
  "bracketSpacing": true,
  "bracketSameLine": false,
  "arrowParens": "always",
  "endOfLine": "lf",
  "singleAttributePerLine": false,
  "proseWrap": "preserve"
}

What this tool does not do

It does not format your project, install Prettier, or expose plugins and file overrides. For editor indent defaults outside Prettier, use .editorconfig Generator. Generation stays in your browser.

How to use .prettierrc Generator

  1. Optionally click a style preset, then adjust the sliders, toggles, and radio groups.
  2. Read the JSON on the right as it updates.
  3. Copy or Download the file into your repository root.

Frequently asked questions

How does .prettierrc Generator work?

The JSON on the right updates as you change options. All 14 keys in the form are always written out, including values that match Prettier’s usual defaults. Copy or Download saves a file named .prettierrc. This page builds a config file; it does not run Prettier on your source.

What do the Airbnb, Google, and Standard JS presets change?

Each preset starts from the Prettier Defaults set and overlays a few options. Airbnb Style sets printWidth 100, singleQuote true, and trailingComma es5. Google Style sets singleQuote true, trailingComma none, and arrowParens avoid. Standard JS sets semi false, singleQuote true, trailingComma none, and arrowParens avoid. They are convenience snapshots, not official or complete style guides. Changing any control afterward clears the preset highlight.

Which Prettier options can I set?

printWidth (60–160 in steps of 10), tabWidth (1–8), useTabs, semi, singleQuote, jsxSingleQuote, quoteProps, trailingComma, bracketSpacing, bracketSameLine, singleAttributePerLine, arrowParens, endOfLine (including auto), and proseWrap. There is no plugins, overrides, parser, embeddedLanguageFormatting, or htmlWhitespaceSensitivity control.

Is anything uploaded?

No. The JSON is built in your browser. Prettier itself is not invoked here.

Related tools and guides

References