This service is powered by JS Beautifier, which is a web based application that parses the css files and makes it more readable. It removes all the newlines, spaces and tabs from the code so that it saves space in file size but it becomes very difficult for humans to understand what is actually written in the code.
In my case it had to do with a CSS file that was compressed. The same file uncompressed would have been 37KB, but after compressing it, it was now only 16KB. It wasn’t a huge file, mind you, but I had to constantly make changes to the stylesheet and decompressing the file every time got tedious very fast.
The solution was to use an online service that does all the dirty work for me. Here is a list of some of them:
CSS Unminifier (http://cssbeautify.com/) – Online tool for unminifying CSS files
In my case I used the last one since it has a nifty feature I found useful: you can paste the original compressed code in one column, then the uncompressed code in another column, and whenever you make changes to either column, it will automatically update the other one.
To make your code readable again, just enter or paste the minified code into the text area and click Unminify. You can then select and copy the unminified code.
It can handle very large files (up to 1GB), but I don’t recommend it since you may lose the process if there are too many functions.
Minify is the process of removing all unnecessary characters from source code without changing its functionality. These unnecessary characters usually include white space characters, new line characters, comments, and sometimes block delimiters, which are used to add readability to the code but are not required for it to execute.
CSS minifier tool is also available online. You can paste your css files inside input box and click on compress button to get your CSS minified or compressed. You can also use our online tool to compress or minify css files directly from your browser without any registration.
I also tried to unminify CSS code generated by the W3C validator and it worked, but only until the first CSS comment. I noticed that the first comment is in fact included in the output. However, comments are not allowed at all in inline styles (or style attributes). In some cases it is possible to place a comment before the style attribute, but then it will not be within the attribute value.
I know this is probably not a big issue, and I should probably just ignore it and move on, but I’m curious: Why does unminify remove comments from CSS code?
In computer science, minification is the process of removing all unnecessary characters from source code without changing its functionality. These unnecessary characters usually include white space characters, new line characters, comments, and sometimes block delimiters, which are used to add readability to the code but are not required for it to execute.