Prettier Config Generator
DeveloperGenerate a Prettier configuration file for consistent code formatting. Supports JSON, JavaScript, and YAML output formats.
Quick Presets
Formatting Options
Output Format
About Prettier
Prettier is an opinionated code formatter that supports JavaScript, TypeScript, CSS, HTML, JSON, Markdown, and more.
- Consistent Formatting - Enforces a uniform code style across your project
- IDE Integration - Works with VS Code, WebStorm, Vim, and all major editors
- CI/CD Ready - Use
prettier --checkin your pipeline - ESLint Compatible - Use eslint-config-prettier to avoid conflicts
What is This Tool?
A Prettier config generator creates .prettierrc configuration files for the Prettier code formatter. Configure print width, tab width, semicolons, quotes, trailing commas, and other formatting options to match your team's code style preferences.
Prettier is an opinionated code formatter supporting JavaScript, TypeScript, CSS, HTML, JSON, Markdown, and more. By enforcing consistent formatting automatically, Prettier eliminates style debates in code reviews. Configuration options are intentionally limited to prevent bikeshedding.
Common Use Cases
Project Setup
Generate a .prettierrc file when setting up new projects to establish consistent formatting from day one.
Team Alignment
Create a shared Prettier config that all team members use via editor integration and pre-commit hooks.
CI Integration
Configure Prettier for CI checks (prettier --check) to ensure all committed code matches the defined format.
Migration
Generate a Prettier config that approximates your existing code style when adopting Prettier on established codebases.
Frequently Asked Questions
What options are available?
Print width, tab width, tabs vs spaces, semicolons, single vs double quotes, trailing commas, bracket spacing, JSX quotes, and more.
Which config format should I use?
.prettierrc (JSON) is most common. .prettierrc.js (JavaScript) allows comments and logic. package.json "prettier" key avoids an extra file.
How does Prettier differ from ESLint?
Prettier handles formatting (whitespace, line breaks). ESLint handles code quality (unused vars, error handling). They complement each other.