Code Beautifier
JS, Python, SQL formatter
What is Code Beautifier?
Format TypeScript, JavaScript, JSON, CSS, HTML, Markdown, YAML, or SQL using Prettier's standalone build in the browser. Parsers load on demand per language so bundle size stays small. Options include tab width (2 or 4), tabs vs. spaces, and single-vs-double quotes for JS/TS. Great for cleaning up a snippet before sharing in documentation or a code review.
How do I use Code Beautifier?
- Paste code into the input panel.
- Choose the language.
- Set tab width, quote style, and tabs/spaces.
- Copy or download the formatted code.
When should I use Code Beautifier?
Code Beautify is for readability. To go in the opposite direction (shrink JS size), use Code Minify. For SQL specifically, SQL Formatter offers dialect-aware output with more fine-grained controls.
Which languages does it format?
JavaScript, TypeScript, JSX/TSX, JSON, CSS, SCSS, HTML, Vue, YAML, Markdown, GraphQL — all via Prettier.
Can I configure tabs vs spaces, line width, etc.?
Yes. The options panel mirrors Prettier's config: tabWidth, useTabs, printWidth, semi, singleQuote, trailingComma.
Is it the same Prettier I use on the command line?
Same library, same version (updated with each release). The output is byte-identical to running prettier locally with matching options.
Is my file uploaded anywhere?
No. Everything runs in your browser. Your files never leave your device, and there is no server component for this tool.