Code Formatter

All-in-one code formatter: beautify JavaScript, TypeScript, JSX, TSX, JSON5, GraphQL, Vue SFC, PHP, and TOML. More languages: Python Formatter | Go Formatter | C/C++/C#/Java Formatter | Shell Script Formatter. Also: Code & Dev Tools | CSS Tools | HTML Tools | XML Tools | YAML Tools.
All processing happens locally in your browser — your data is never uploaded to any server.
Mode:
How to use: Paste your code in the left textarea, choose a language mode, and click Process (or just type — auto-process on input).
Format: Reformats code with consistent indentation, proper spacing, and opinionated line-breaking.
Options: Adjust indent (2/4 spaces or tabs), toggle semicolons, and switch between single/double quotes for JS/TS modes.
JSON5 mode: Supports JSON with comments, trailing commas, unquoted keys, and single-quoted strings.