Compile LESS to CSS Online — less.js Browser Compiler

Compile one LESS snippet or bundle a local project folder with native @import resolution. Compress the output and use source maps for single files. Everything runs in your browser.

Loading…
LESS compiler — browser playbook
Compile LESS snippets to standard CSS before minifying or sharing. Runs less.js on demand in your browser.

Developer notes

Drop a project folder to resolve local @import paths. node_modules, packages and remote URLs are not resolved. Inline JavaScript in LESS is off by default; enable only if you trust the source. Strict math requires parentheses around calculations when enabled. Auto-compile on paste/sample; typed edits need Compile (⌘↵). Source maps are available for single files and unavailable in bundle mode v1.

Bundle local partials

Choose Bundle project, drop a folder, then select one entry file. FastMinify preserves relative paths and lets Less discover reachable .less files through @import. The browser-local bundle is limited to 32 MiB per file and 32 MiB total. Version 1 has one entry, no source maps and no node_modules package resolution.

Options

Compress
Removes unnecessary whitespace from the compiled CSS output.
Source map
Embeds an inline source map in the CSS output for debugging.
Inline JavaScript
Allows LESS features that evaluate JavaScript expressions — off by default for safety.
Strict math
Requires parentheses around math operations in LESS expressions.

When teams pick this route

Convert legacy LESS components to CSS for migration. Preview parametric mixins before integrating into a build. Share compiled CSS with teammates who do not use LESS. Quick-check guard expressions and operations.

Worked examples

Variables and operations

LESS input

@base: #336699; @gap: 8px + 4px; .panel { color: @base; margin: @gap; }

Compiled CSS

.panel { color: #336699; margin: 12px; }

Parametric mixin

LESS input

.rounded(@r: 4px) { border-radius: @r; } .btn { .rounded(6px); padding: 8px; }

Compiled CSS

.btn { border-radius: 6px; padding: 8px; }

Navigate related tools

Beautify LESS with beautify LESS, decompress with unminify LESS, or browse the CSS preprocessors hub.

LESS compiler FAQ

Browser-only compilation

Why can't I use @import for Bootstrap or other libraries?

Project bundles resolve local .less files that you drop into the browser. Paths to node_modules, packages, CDNs or files outside that dropped folder are not available.

What does Strict math do?

When enabled, calculations like 8px + 4px require parentheses. This matches stricter LESS compiler modes used in some build pipelines.

When does compilation run automatically?

On paste and sample load. Typing alone does not trigger compilation — use Compile or ⌘↵.

Is a project bundle the same as concatenating files?

No. Less starts from one entry file and resolves only the @import dependencies it reaches. File order is not manually concatenated. Bundle mode v1 is limited to one entry, 32 MiB total, no source maps and no npm package imports.

Compile SCSS or LESS to standard CSS in the browser — pair with beautify or minify for a full stylesheet workflow.