Configure options below — the preview updates in real time.
Core formatting rules that control how Prettier prints your code.
The line length that the printer will wrap on. This is not a hard limit but a guideline Prettier strives to meet.
The number of spaces per indentation level.
Controls when properties in objects are quoted.
Print trailing commas wherever possible in multi-line comma-separated syntactic structures.
Include parentheses around a sole arrow function parameter (e.g. (x) => x vs x => x).
Controls how object literals are wrapped when they exceed the print width (Prettier 3.5+).
Options that control which parser Prettier uses and how it processes files.
Format code starting at a given character offset (inclusive). Useful for formatting a selection.
Format code ending at a given character offset (exclusive). Use Infinity to format to the end of the file.
Specify which parser to use. Generally not recommended in top-level config; Prettier auto-infers from file extensions.
Specify the file name to use to infer which parser to use. Mainly useful via CLI or API.
Options that affect formatting for specific languages and file types.
Controls how to wrap prose (e.g. Markdown text).
Specify the global whitespace sensitivity for HTML, Vue, Angular, and Handlebars files.
Specifies the end of line (EOL) character used.
Control whether Prettier formats quoted code embedded in the file (e.g. template literals or Markdown code blocks).
Controls where operators are placed when a binary expression breaks across lines (Prettier 3.5+).
Plugins and integrations that extend Prettier's functionality.
Third-party Prettier plugins to load. Enter package names or paths.
Get started
1{}