LESS beautifier and minifier
Format or compact LESS source locally, with copy and file download.
A clear answer. Here’s how.
Formats LESS with Prettier. Conservative compaction uses the PostCSS LESS parser and removes structural whitespace, retaining selectors, expressions, values and comments. It does not compile variables, mixins or nesting into CSS. Nothing is fetched or executed. Up to 200,000 source characters. Review generated source before using it.
How this is checked
2 reference checks passed These 2 cases were run when this page was built, on 3 December 2026, and all reproduce within the stated tolerance. The same cases are part of the automated tests that run on every change to Toolmoz. Engine version 1.
See the checks and where each expected answer comes from
Case 1
- Inputs
- Source .a { color: red }Output minify
- Expected, and what Toolmoz gave
- text expected .a{color:red}, Toolmoz .a{color:red}
- Where the expected answer comes from
- A rule consists of selector .a, braces and declaration color:red; spaces around structural punctuation are unnecessary.
- Allowed difference
- exact
Case 2
- Inputs
- Source a { content: "a b" }Output minify
- Expected, and what Toolmoz gave
- text expected a{content:"a b"}, Toolmoz a{content:"a b"}
- Where the expected answer comes from
- Structural whitespace is removed while the string value a b retains its internal space.
- Allowed difference
- exact
What this shows: the engine reproduces independently worked values for these cases. It does not prove every possible input is right. To test an answer you were given, see how to check a number; to see what is and is not checked across Toolmoz, see the accuracy ledger.
See a worked example
Worked example
A fixed demonstration, separate from the values you enter above.
- Source
- @brand: #24533d; .card { color: @brand; &:hover { color: lighten(@brand, 10%); } }
- Output
- Beautify
- Indent
- 2 spaces
Example result
@brand: #24533d;
.card {
color: @brand;
&:hover {
color: lighten(@brand, 10%);
}
}
Source is parsed locally and never executed. Review formatting before using the result.