Less to CSS Converter

Convert Less code to browser-ready CSS

Input Less

Compiled CSS

Paste your less on the left and the CSS shows up here.

Or drop a file on this box, , or .

What Is Less to CSS?

Less extends CSS with variables, nesting, mixins, and functions, but browsers do not understand it natively, so you have to compile it down to plain CSS first. This page runs a full Less compiler in your browser, so everything in the Less feature set works on a single stylesheet: variables, nested rules and &, mixins with defaults and guards, operations, @media blocks inside a rule, and functions such as darken(), fade() and percentage(). What comes out is plain CSS you can check against browser support tables. The one thing it cannot do is reach other files, so @import "variables.less" stops with an error that tells you so. For a whole project with imports, compile with the official Less.js compiler.

Use it when you want quick compilation without setting up a build pipeline. The compiler is downloaded the first time you convert something and then runs locally, so your stylesheet is not uploaded, and the CSS refreshes a moment after you stop typing. A CSS-only import like @import url("reset.css") is left in the output untouched, the same as lessc does.

How to Use the Less to CSS Converter

There is no compile button. The Compiled CSS pane updates a moment after you stop typing, and a mistake shows up there as a one-line message instead of CSS.

1

Paste, Upload, or Load Sample

Type into the Input Less pane, or open a .less or .css file with Upload. Sample fills in a subscriber card that uses three variables, a .rounded() mixin with a default, darken() and fade(), a &:hover rule and a nested @media block. A shorter snippet using the features people reach for first:

@brand: #0f766e;
@gap: 10px;
.plan-card {
  padding: @gap (@gap * 2);
  .price { color: @brand; font-weight: 600; }
  &.is-roaming { border-left: 3px solid darken(@brand, 10%); }
}
2

View Compiled CSS

The right Compiled CSS panel shows what that snippet compiles to. The math is done, darken(@brand, 10%) becomes a real hex color, and every nested rule is written out with its full selector. If something is wrong, you get the compiler's message with its line and column, for example Line 4, column 12: variable @gutter is undefined.

.plan-card {
  padding: 10px 20px;
}
.plan-card .price {
  color: #0f766e;
  font-weight: 600;
}
.plan-card.is-roaming {
  border-left: 3px solid #094944;
}
3

Copy or Download

Copy grabs the Compiled CSS pane, Download writes it out as compiled.css, and the trash button clears both panes. Inline JavaScript in backticks and @plugin are switched off, so a stylesheet that depends on them needs your local build.

Related CSS Tools

Compilation is usually one step in a styling workflow. You may also need: