.prettierrc Generator

Build a .prettierrc.json for your project. Every Prettier option that matters, in one form, with the modern defaults pre-selected. Download or copy.

How to use the .prettierrc Generator

Toggle the options; the JSON updates live. The defaults match modern style — 100-col width, 2-space indent, double quotes, semicolons, trailing commas everywhere. Drop the file at your repo root.

What a .prettierrc file controls

Prettier reformats your code to one canonical style on every save or commit, which ends the endless debates over quote style, trailing commas, and line width — but only once you have pinned the handful of options it exposes. Left unconfigured, teammates on different Prettier versions or editor defaults can still produce conflicting output, which is exactly the inconsistency the tool is meant to remove.

This builds a .prettierrc.json with the options that actually change the result — print width, quotes, semicolons, trailing commas, tab width — defaulted to modern conventions. Prettier governs the languages it understands (JS, TS, CSS, JSON, Markdown, and more); for the editor-level basics that apply to every file type, add an .editorconfig generator file, and if you are writing TypeScript, set up its compiler with the tsconfig.json generator.

Common use cases

  • End style debates — one config decides quotes, commas, and width for the whole team.
  • CI formatting checks — fail a build when code is not formatted to the agreed style.
  • Format on save — wire the config into your editor so saving normalises code instantly.
  • Consistent diffs — formatting noise disappears, so reviews focus on real changes.
  • Shared presets — commit the file so every clone of the repo formats identically.

Frequently asked questions

Why does Prettier override most ESLint style rules?

Prettier handles formatting; ESLint should focus on code quality. Running both with eslint-config-prettier avoids the conflicts.

JSON, YAML, or JS config file?

All work. JSON (.prettierrc.json) is the most portable and is what this generates.

Does it overlap with EditorConfig?

Partly — Prettier reads .editorconfig for indent and width if no Prettier option is set. EditorConfig is broader; Prettier reformats more deeply.

How do I format only some files?

Add a .prettierignore file, same syntax as .gitignore, to skip generated or vendored code.
Embed this tool on your site

Free to embed, no attribution required (but appreciated). Paste this where you want the tool to appear: