CSS Obfuscator

This is a free online tool that allows you to obfuscate CSS code.

How to Use it :

  1. Enter your CSS code in the input box below.
  2. Click Obfuscate. It will convert the CSS code to obfuscated JavaScript code.
INPUT (CSS)
OUTPUT (JavaScript)
To install the output JavaScript code in your web page, use one of these methods :
<script>...</script>
<script src="/path/to/JavaScript/file"></script>
Do not use :
<style>...</style>
<link href="..." rel="stylesheet" />

IMPORTANT: If your CSS contains a relative path (e.g. background: url(../img/bg.jpg); ), the output JavaScript also contains the same relative path. Make sure you place the JavaScript file in your website in such a way that the relative path is maintained. If you broke relative paths, then you would encounter missing images, fonts and other web resources.

The easiest way to decide where to put the output JavaScript file is put it in the same folder as your input CSS file is located.

For example, if the path of the CSS file is mysite/css/style.css, then put the output JavaScript file in mysite/css/. Putting it in the same folder guarantees all the relative paths in your CSS file are maintained.