Alloy is a web API for compiling CSS using preprocessors.


Tired of having to write plain old CSS in the "Custom CSS" field on websites? These bookmarklets will allow you to compile any textarea filled with a preprocessor language into CSS. Just click the bookmarklet then click the textarea. Drag your favorite to the bookmark toolbar!

API Reference

To use the Alloy API, you will make a simple POST request to The request can either be of type applicaton/json or application/x-www-form-encoded and must include a source parameter with the uncompiled code and a type parameter. The type parameter can be any one of sass, scss, less, and stylus.

You can additionally pass a compress parameter if you would like the resulting CSS to be minified.


Content-Type: application/json

  "source":"@import \"compass\"\n\n.btn\n  @mixin border-radius(15px)\n  background-color: blue",

Calling Alloy From the Browser

Alloy supports Cross-Origin Resource Sharing (CORS) so you can safely make AJAX requests directly to the Alloy endpoint. Here's a jQuery example:

  url: "",
  type: "POST",
  dataType: "text",
  data: {
    compress: true,
    type: "sass",
    source: "body\n  color: blue"
  success: function(css) {