# CSS code scrambler

> 

Page: https://ishowpdf.com/tools/css-scrambler

## What CSS code scrambler does

The CSS code scrambler squeezes a stylesheet onto one line and, if you want, replaces its class names with short random ones. Web developers use it to send a smaller file and to make the styling harder to read or reuse at a glance.

Comments and extra spaces are removed, and a list under the result pairs every old class name with its new one. Names change only in selectors, so text inside quotes, such as a url() or an attribute value, is left alone. Turn off Rename classes to minify only. Since new names are random, each run gives different ones.

## How to use CSS code scrambler

1. **Paste your CSS**: Put the whole stylesheet in the box. Code you paste stays in your browser.
2. **Choose renaming**: Keep Rename classes ticked to shorten class names, or untick it to only shrink the code.
3. **Press Scramble**: Copy the one-line result or download it as scrambled.css.
4. **Update your HTML**: Open the New class names list and change each class in your HTML and JavaScript to match.

## Questions

**Will my website break after renaming classes?**

It will unless the HTML and any JavaScript use the new names too. Use the list of new class names to replace each one everywhere it appears.

**Can someone undo scrambled CSS?**

The formatting can be restored by any code beautifier, but the original class names cannot be read back from the result. Treat this as a way to tidy and obscure code, not as protection.

**Is this the same as minifying CSS?**

With Rename classes off, yes: comments, spaces and final semicolons are removed and the rules stay the same.

More free tools: https://ishowpdf.com/tools
