About this tool
Inconsistent indentation, mismatched quote styles, missing semicolons, and cramped one-liners make code harder to read and review — especially in code pasted from Slack, Stack Overflow, or a teammate's editor with different settings. This tool runs Prettier, the widely used opinionated code formatter, directly in your browser to reformat JavaScript, JSX, TypeScript, JSON, CSS, SCSS, LESS, HTML, Markdown, and YAML with consistent spacing, quote style, and line breaks. Pick a language, adjust indent width and quote/semicolon preferences, and get a cleanly formatted result you can copy or download instantly. Because formatting happens entirely client-side, proprietary code or anything under an NDA never leaves your machine.
Frequently asked questions
Which languages are supported?
JavaScript/JSX, TypeScript/TSX, JSON, CSS, SCSS, LESS, HTML, Markdown, and YAML — select the language from the dropdown above the editor.
Does it use the real Prettier engine?
Yes — this runs Prettier's official standalone browser build with the matching language parser, loaded from a CDN, so the output matches what you'd get from Prettier locally or in CI.
What happens if my code has a syntax error?
Prettier needs to parse code before it can format it, so invalid syntax will show a parse error in the diagnostics panel with a hint about what's wrong.
Can I control quote style and semicolons?
Yes — for JavaScript and TypeScript there are toggles for single vs. double quotes and whether to add semicolons; indent width (2 or 4 spaces) applies to every language.
Is my code uploaded anywhere?
No — formatting runs entirely in your browser using WebAssembly-free, pure-JS Prettier. Nothing you paste is sent to a server.