What does this tool do?
The Prettier Config Generator produces a ready-to-use .prettierrc file for teams and individual developers. You set options like tab width, print width, semicolons, and single quotes visually, and the tool turns them into copy-paste JSON output.
How to use it
- Enter your configuration details.
- Review the generated output.
- Copy the ready-to-use code or file.
Which options can you set
The tool covers the most common Prettier options: tab width (tabWidth), print width (printWidth), trailing comma (none/es5/all), arrow parens (always/avoid), semicolons (semi), single quotes (singleQuote), using tabs instead of spaces (useTabs), and bracket spacing (bracketSpacing). The JSON output updates instantly with every change, so you get immediate feedback on how each setting affects the resulting configuration.
How to use the output
Copy the generated JSON and paste it into a file named '.prettierrc' in your project root. Alternatively, you can add the content under a 'prettier' key in package.json. With Prettier installed, running 'npx prettier --write .' formats all your files according to these rules. Your editor's Prettier extension also reads the same file automatically, keeping formatting consistent across the team.
Frequently asked questions
What's the difference between the trailingComma options?
'none' adds no trailing commas; 'es5' adds them only where older JavaScript allows (arrays, objects); 'all' adds them everywhere possible, including function parameters. Modern projects usually prefer 'all' or 'es5'.
Do useTabs and tabWidth work together?
With useTabs on, Prettier indents using tab characters, while tabWidth controls how many spaces each tab is displayed as. With useTabs off, indentation uses tabWidth spaces instead.
Can I put the output somewhere other than .prettierrc?
Yes. You can place this JSON in '.prettierrc', '.prettierrc.json', or under the 'prettier' field in package.json. Prettier automatically recognizes all of these configuration sources.
Is Prettier Config Generator free?
Yes. Prettier Config Generator and all 300+ tools on MagmaNex are completely free with no signup or account required.
Is my data safe?
Yes. Everything runs locally in your browser. The data you enter is never sent to a server, stored, or shared.
Does it work on mobile?
Yes. Prettier Config Generator works on phones, tablets and desktops — no app download needed.
🔒 Privacy: everything runs in your browser, your data is never sent to a server.
