← All Tools

Prettier Config Builder

Build a .prettierrc file interactively. Toggle options, watch a live sample format in real time, then copy the config as JSON, JSON5, YAML, or a package.json field.

Options

Line length the printer will try not to exceed.
Number of spaces per indentation level.
Indent with tabs instead of spaces.
Print semicolons at the end of statements.
Use ' instead of " for strings.
Use single quotes in JSX attributes.
Where to add trailing commas in multi-line constructs.
Spaces between object brackets: { foo } vs {foo}.
Put > of multiline HTML/JSX on the last line.
Include parens around a sole arrow function parameter.
How to handle quoted object property keys.
Wrap markdown prose by print width.
Line ending character.
How Prettier treats whitespace around HTML tags.
Format code embedded inside other files.
Enforce one attribute per line in HTML/JSX/Vue.

Config


  

Live Sample Preview

An approximation showing how semi, quotes, tab width, trailing commas, and bracket spacing affect output.


  
Copied!