JSON Converters Code Gen Formatters All tools Browse all tools built byAbhay Darji

LESS Formatter

Format LESS with consistent indentation, preserving variables, nesting and mixins.

100% client side No upload No size limit Works offline
Input
Output
Ready
Drop a file to load it

About this tool

Reformat LESS — variables prefixed with `@`, plus mixins and nesting — keeping variables, nesting and comments intact.

When you would use it

  • Tidying a LESS partial
  • Normalising indentation across a stylesheet
  • Making generated output readable

Worked example

LESS
@primary:#333;.a{color:@primary;.b{margin:0}}
Formatted
@primary: #333;

.a {
  color: @primary;

  .b {
    margin: 0;
  }
}

Things worth knowing

  • LESS variables are recognised and preserved rather than being mistaken for declarations.
  • Nesting depth is reflected in the indentation, which is what makes preprocessor files readable.
Questions

Frequently asked

Does this compile LESS to CSS?
No — it formats the source. Mixins, functions and control directives are preserved as written rather than evaluated. Use the LESS to CSS converter for a syntax translation.
Is my data uploaded anywhere?
No. Every tool on JSONWorks runs entirely in your browser using JavaScript. Your input is never sent to a server, never logged and never stored. The simplest proof is to disconnect from the internet — the tools keep working. The site does load Google Fonts and a Google Analytics page-view tag, so you will see those two requests in your network tab, but neither receives anything you type or paste.
Related

Tools that pair well with this