Prettierrc Generator
Toggle the Prettier options you care about, see the JSON update live, and copy a minimal .prettierrc that only lists the settings that differ from Prettier's defaults.
How to generate a .prettierrc
- Adjust the options you want, such as print width, quotes and semicolons.
- Watch the JSON update, showing only the settings that differ from the defaults.
- Copy the result into a .prettierrc file at the root of your project.
Examples
Single quotes, no semicolons, wider lines
semi: false, singleQuote: true, printWidth: 100
{
"printWidth": 100,
"semi": false,
"singleQuote": true
}Frequently asked questions
Why does the output only show some options?
The generator writes a minimal config: only the options that differ from Prettier's defaults are included. This keeps the file short and easy to read.
What if I keep every setting at its default?
Then the output is an empty object, which is a valid .prettierrc. Prettier will simply use all of its default formatting rules.
Can I use this JSON in package.json instead?
Yes. Copy the object as the value of a 'prettier' key in package.json, or save it as a standalone .prettierrc, .prettierrc.json or prettier.config file.
What does trailingComma all mean?
It tells Prettier to add trailing commas wherever possible, including function parameters. It is the default in modern Prettier and works in current JavaScript.
Is my configuration private?
Yes. The file is built entirely in your browser and nothing is uploaded.
Related tools
EditorConfig Generator
Generate a .editorconfig file online. Set indent style, size, line endings, charset and per-file overrides, then copy the result. Free and private.
ESLint Config Generator
Generate an ESLint config for JavaScript or TypeScript with React, Vue or Node. Pick a style, set semi, quotes and indent, then copy or download.
tsconfig.json Generator
Generate a tsconfig.json for Node, Browser, React, Next.js or a library. Pick a preset, toggle strict, paths and source maps, then copy or download.
.env to JSON
Convert a .env file to JSON, or JSON back to .env. Parses KEY=value lines, comments, quotes and export. Runs entirely in your browser.
ASCII Table
Full ASCII table for all 128 codes with decimal, hex, octal and binary values, character names and descriptions. Search by code, hex or character.
Aspect Ratio Box Generator
Generate CSS for a responsive aspect-ratio container. Use the modern aspect-ratio property or the padding-top fallback, then copy the ready code.