Format code with the real Prettier, right in your browser. Paste JavaScript, TypeScript, JSON, CSS, HTML, Markdown, YAML or GraphQL, and it's formatted as you type, with the language detected for you. Tweak print width, indentation, quotes, semicolons and trailing commas to match your project, then copy or download the result. Nothing is uploaded.
| Language | Parser |
|---|---|
| JavaScript / JSX | babel |
| TypeScript / TSX | typescript |
| JSON | json |
| CSS / SCSS / Less | css / scss / less |
| HTML / Vue | html / vue |
| Markdown | markdown |
| YAML | yaml |
| GraphQL | graphql |
Yes, Prettier 3's official standalone build, so output matches the CLI with the same options.
JavaScript/JSX, TypeScript/TSX, JSON, CSS, SCSS, Less, HTML, Vue, Markdown, YAML and GraphQL.
It looks at the text's shape (tags, braces, YAML keys, headings, type annotations). If it guesses wrong, pick the language yourself.
Prettier only formats valid code. The message shows the line and column where parsing failed.
No. Formatting runs in your browser.
This runs Prettier 3's standalone build in your browser. Only the parser plugins the chosen language needs are downloaded: Babel for JavaScript and JSON, TypeScript for TS, PostCSS for CSS, SCSS and Less, and so on. HTML and Vue also load the CSS and JavaScript parsers, so code inside <style> and <script> is formatted too. Auto-detect looks for signs such as a leading tag, valid JSON, YAML keys, Markdown headings, CSS rule blocks or TypeScript type annotations, and you can override it. Formatting re-runs 250 ms after you stop typing. Syntax errors are shown with Prettier's own line and column pointer. The options map directly to Prettier's: printWidth, tabWidth, useTabs, semi, singleQuote, trailingComma and bracketSpacing.