CSS to LESS
Convert a CSS file to LESS. The syntax is shared, so the result is a clean, re-indented stylesheet.
What CSS to LESS does
LESS reads CSS directly, which is why this page is short: it re-indents the file so the structure is visible — one declaration per line, a blank line between rules — and changes nothing else. No variable is invented and no rule is merged. If you are moving to LESS from another preprocessor, convert the syntax first with SCSS to LESS, which also maps $brand to @brand.
How to use it
CSS to LESS: paste the CSS into the box above, and press Run to get the LESS below.
Worked example
Input:
.button {
background: #0066cc;
color: #ffffff;
padding: 10px 16px;
}
.button:hover {
background: #004a99;
}
@media (max-width: 40rem) {
.button {
width: 100%;
}
}
Output:
.button {
background: #0066cc;
color: #ffffff;
padding: 10px 16px;
}
.button:hover {
background: #004a99;
}
@media (max-width: 40rem) {
.button {
width: 100%;
}
}
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 CSS and returns LESS; reloading the page discards both.
LESS reads CSS directly, which is why this page is short: it re-indents the file so the structure is visible — one declaration per line, a blank line between rules — and changes nothing else. No variable is invented and no rule is merged. If you are moving to LESS from another preprocessor, convert the syntax first with SCSS to LESS, which also maps `$brand` to `@brand`.
Convert a CSS file to LESS. The syntax is shared, so the result is a clean, re-indented stylesheet.
How to use it
CSS to LESS: paste the CSS into the box above, and press Run to get the 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 CSS and returns LESS; reloading the page discards both.
What to Expect
Best for
- Converting CSS to 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
.button { background: #0066cc; color: #ffffff; padding: 10px 16px; } .button:hover { background: #004a99; } @media (max-width: 40rem) { .button { width: 100%; } }
Sample output
.button { background: #0066cc; color: #ffffff; padding: 10px 16px; } .button:hover { background: #004a99; } @media (max-width: 40rem) { .button { width: 100%; } }
Frequently asked questions
How do I use the css to less?
CSS to LESS: paste the CSS into the box above, and press Run to get the 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.