What the beautifier does
- HTML: puts block elements on their own lines and indents nested tags. Inline elements such as
<b>and<a>stay in the flow of the text. Embedded<style>and<script>are formatted too. - CSS: one declaration per line, with nested
@mediarules indented. - JavaScript: consistent indentation, spacing and braces. It also unpacks code that was minified onto one line, which helps when reading a library or a script from another site.
Formatting changes whitespace only, so the code behaves exactly as before. It uses the open-source js-beautify library, running in your browser.
Minify
CSS minify removes comments and every space that is not needed. HTML minify removes comments and collapses runs of whitespace to a single space, keeping <pre>, <textarea>, scripts and styles exactly as they are, so the page looks the same. JavaScript minify is not offered: shrinking JavaScript safely needs a full parser, so use a build tool such as esbuild or terser.