Skip to content

Format or minify LESS stylesheets while preserving variables, nesting, and mixins without compiling.

Loading tool

About LESS Beautify / Minify

Format or minify LESS stylesheets without compiling them. Variables, mixins, guards, nesting and operations are kept as written; beautify re-indents with 2, 4 or 8 spaces or tabs, while minify strips // and /* */ comments (keeping /*! license */ blocks) and collapses whitespace, preserving strings, ~"..." escapes, url() values and math expressions. A brace check warns about unbalanced braces.

Common uses

  • Tidy a LESS file with inconsistent indentation or one-line rule blocks.
  • Review a deeply nested LESS component in a readable form.
  • Track down an unclosed brace in a large stylesheet.
  • Compact a LESS snippet before embedding it somewhere.

FAQ

Does this compile LESS to CSS?
No. It only formats or compacts the LESS source; mixins, variables and functions such as darken() remain in the output. Use the lessc compiler or your build tool to produce CSS.
Why are // comments removed when minifying LESS?
LESS supports // single-line comments, which never appear in compiled CSS, so they are safe to remove. Removing them is also required before collapsing lines, since a // comment would otherwise swallow the code after it.