01What is Prettier Config Generator?
Prettier settles style arguments by having very few options, but you still need a .prettierrc that says which ones your team changed. This generator builds that file as JSON from a few inputs and checkboxes. It also keeps the file short, which matters more than it sounds. The controls map straight to Prettier's documented options. Print Width (40 to 200) and Tab Width (1 to 8) are number fields. Trailing Comma offers All, ES5 and None. Arrow Parens offers Always and Avoid. End of Line offers LF, CRLF and Auto. Prose Wrap offers Preserve, Always and Never. Then there are checkboxes for Semicolons, Single quotes, Bracket spacing, Bracket same line, Use tabs and Single attr/line. Here's the part we like. The generator compares each value with Prettier 3's defaults and writes only the ones that differ. Those defaults are printWidth 80, tabWidth 2, semicolons on, double quotes, trailingComma all, bracketSpacing on, arrowParens always, endOfLine lf and proseWrap preserve. Leave everything alone and you get {}. That's a valid config and it tells reviewers your repo uses stock Prettier. Two plugin toggles add to a plugins array. Tailwind plugin adds prettier-plugin-tailwindcss, which sorts utility classes. Import order plugin adds @trivago/prettier-plugin-sort-imports plus importOrder, importOrderSeparation and importOrderSortSpecifiers. With both on, the Tailwind plugin is always listed last, because its docs ask for that. A short worked example: load the Minimal preset. It sets printWidth 80, semi true, singleQuote true and trailingComma es5. The first two match the defaults, so the output is just singleQuote true and trailingComma es5. Presets are applied on top of a clean default state, so switching from Monorepo to Minimal doesn't leave the plugins switched on. Limits worth knowing. The importOrder groups are fixed placeholders (@core, @server, @ui, then relative paths). Edit them to match your real aliases. The page doesn't install plugins, so you still need npm install for each one. There's no control for overrides blocks, parser choice or htmlWhitespaceSensitivity, so add those by hand. And the output is always JSON. If you want a prettier.config.js or YAML file instead, you'll need to convert it yourself.
JavaScript and TypeScript developers who want a short .prettierrc that lists only the options their team actually changed. The tool runs entirely in your browser, so your data never leaves your device.
02How to use Prettier Config Generator
- Pick TypeScript project, Minimal or Monorepo from the examples, or start from the defaults.
- Set Print Width and Tab Width, then choose Trailing Comma, Arrow Parens, End of Line and Prose Wrap.
- Tick or untick Semicolons, Single quotes, Bracket spacing, Bracket same line, Use tabs and Single attr/line.
- Turn on Tailwind plugin or Import order plugin if you want them.
- Click Copy, save the JSON as .prettierrc in the repo root, and install any plugins you enabled.
03Worked examples
- Input:
All options at their defaults - Result:
{} - Nothing differs from Prettier 3's defaults, so nothing is written.
- Input:
Minimal preset - Result:
{ "singleQuote": true, "trailingComma": "es5" } - The preset also sets printWidth 80 and semi true, but those are defaults and are left out.
- Input:
TypeScript project preset - Result:
{ "printWidth": 100, "singleAttributePerLine": true, "plugins": [ "prettier-plugin-tailwindcss" ] } - Double quotes, semicolons and trailing commas match the defaults, so only three keys remain.
- Input:
Use tabs on, Tab Width 4, Semicolons off - Result:
{ "tabWidth": 4, "useTabs": true, "semi": false } - Input:
Arrow Parens Avoid, End of Line CRLF, Prose Wrap Always, Bracket spacing off - Result:
{ "bracketSpacing": false, "arrowParens": "avoid", "endOfLine": "crlf", "proseWrap": "always" } - Input:
Monorepo preset - Result:
{ "printWidth": 100, "singleQuote": true, "plugins": [ "@trivago/prettier-plugin-sort-imports", "prettier-plugin-tailwindcss" ], "importOrder": ["^@core/(.*)$", "^@server/(.*)$", "^@ui/(.*)$", "^[./]"], "importOrderSeparation": true, "importOrderSortSpecifiers": true } - The importOrder array is shown on one line here. The tool prints one pattern per line.
04Common use cases
- Writing the first .prettierrc for a fresh Next.js or Vite repo before anyone opens a PR
- Matching an older codebase that already uses single quotes and no semicolons, so the first format run doesn't rewrite every file
- Adding Tailwind class sorting to a project that already formats with Prettier
- Settling a team debate on print width and trailing commas with a config everyone can read in one glance
- Setting up import sorting for a monorepo with @core, @server and @ui path aliases
- Checking which of your current settings are just Prettier defaults and can be deleted
05Tips
- An empty {} is a real config. Commit it anyway so editors know the project uses Prettier.
- If you turn on Import order plugin, replace the @core, @server and @ui patterns with your own aliases, or nothing will group the way you expect.
- Add eslint-config-prettier to your ESLint setup so lint stops flagging formatting that Prettier owns.
- Keep End of Line on LF and let .gitattributes handle Windows checkouts. CRLF configs cause noisy diffs on Mac and Linux machines.
06Related concepts
Prettier, Code formatting, .prettierrc, ESLint, Tailwind class sorting.
Frequently Asked Questions
What is Prettier Config Generator?
Prettier Config Generator is a free, browser-based developer tool on AIDToolStack. Generate .prettierrc config It requires no installation or sign-up and works entirely in your browser.
Is Prettier Config Generator free to use?
Yes. No sign-up, no fees and no usage cap.
Does Prettier Config Generator store my data?
No. It runs in your browser; nothing is uploaded.