A single place to beautify or minify source code and data files. Formatting uses Prettier for HTML, CSS, SCSS, Less, JavaScript, TypeScript, JSON, YAML, Markdown and GraphQL, plus a SQL formatter that understands 20 dialects. Minifying works for HTML, CSS, JavaScript, JSON and XML and reports how many bytes you save.
Common uses
- Tidying a snippet before pasting it into a pull request or ticket
- Shrinking CSS or JavaScript for a quick size check
- Making a one-line SQL query from a log readable
Frequently asked questions
- Which languages can be formatted?
- HTML, CSS, SCSS, Less, JavaScript, TypeScript, JSON, XML, SQL, YAML, Markdown and GraphQL. Pick the language from the selector or open one of the dedicated pages for it.
- Does minifying change what my code does?
- Minifying removes whitespace and comments and, for JavaScript, shortens names with Terser. Behavior is preserved, but always test minified output before shipping it.
- What happens with invalid input?
- The tool shows the exact position of the syntax error instead of returning a blank result, so you can fix it and run again.