LESS Formatter
Format LESS with a real tokenizer: nesting, variables, @{interpolation} and // comments survive. Nothing is uploaded.
What formatting LESS does
LESS is tokenized with its own rules rather than the CSS ones, which matters in two places: a // line comment is a comment here, and @{name} is a single interpolated token rather than an at-rule followed by a block. Variables and mixin calls are left exactly as written — a formatter that computed fade(@brand, 20%) would have to know the value, and it would make the output stop matching the source.
How to use it
LESS Formatter: paste the LESS into the box above, set Indent (default 2), and press Run to get the formatted LESS below.
Worked example
Input:
@brand: #0066cc;
// Sidebar card
.card { padding: 16px;
&:hover { box-shadow: 0 2px 8px fade(@brand, 20%); }
.@{name} { color: @brand; font-weight: 600; } }
Output:
@brand: #0066cc;
// Sidebar card
.card {
padding: 16px;
&:hover {
box-shadow: 0 2px 8px fade(@brand, 20%);
}
.@{name} {
color: @brand;
font-weight: 600;
}
}
Why it runs in your browser
The conversion happens on this page with JavaScript. Your input is not posted to a server, so it works offline after the page loads and nothing is retained anywhere. The page reads LESS and returns formatted LESS; reloading the page discards both.
LESS is tokenized with its own rules rather than the CSS ones, which matters in two places: a // line comment is a comment here, and @{name} is a single interpolated token rather than an at-rule followed by a block. Variables and mixin calls are left exactly as written — a formatter that computed fade(@brand, 20%) would have to know the value, and it would make the output stop matching the source.
Format LESS with a real tokenizer: nesting, variables, @{interpolation} and // comments survive. Nothing is uploaded.
How to use it
LESS Formatter: paste the LESS into the box above, set Indent (default 2), and press Run to get the formatted LESS below.
Why it runs in your browser
The conversion happens on this page with JavaScript. Your input is not posted to a server, so it works offline after the page loads and nothing is retained anywhere. The page reads LESS and returns formatted LESS; reloading the page discards both.
What to Expect
Best for
- Converting LESS to formatted LESS when the data is already on screen.
What this tool keeps
- Your input is not posted to a server, so it works offline after the page loads and nothing is retained anywhere.
Sample input
@brand: #0066cc; // Sidebar card .card { padding: 16px; &:hover { box-shadow: 0 2px 8px fade(@brand, 20%); } .@{name} { color: @brand; font-weight: 600; } }
Sample output
@brand: #0066cc; // Sidebar card .card { padding: 16px; &:hover { box-shadow: 0 2px 8px fade(@brand, 20%); } .@{name} { color: @brand; font-weight: 600; } }
Frequently asked questions
How do I use the less formatter?
LESS Formatter: paste the LESS into the box above, set Indent (default 2), and press Run to get the formatted LESS below.
Is my input uploaded?
No. The text is parsed on this page with JavaScript and is never posted to a server.
Is there a size limit?
Yes: 5 MB per run. Larger input is refused with a message rather than freezing the tab.
Build custom tools for your store
Join the SDK program to create useful ecommerce utilities for your store.