CSS Style Sheet Minimizer

english version deutsche Version

Since it is your style sheet you are responsible for correct function of the minimized code too. In few cases minimized code may behave unexpected.

Step 1 Select input by (optional) choosing the encoding and a style sheet (.css) file. Charset selection is only needed if the file contains non-ASCII characters (UTF8 is a superset of ASCII). Windows users may find the default charset by opening the PowerShell, input [System.Text.Encoding]::Default and look for the value of WebName. Alternatively encode non-ASCII characters like e.g. \0020AC for the euro sign. Style definitions can also be pasted manually from clipboard (click into text area, then [Ctrl]+[V]).

Step 2 Start the minimizer. Please allow some seconds of delay. The result will appear in the text area below.

Step 3 Copy the minimized style sheet into clipboard for your use. This can be also done manually by clicking into the text area, then press [Ctrl]+[A], then [Ctrl]+[C].

Step 4 Addendum: Using the apache webserver the following code, in a .htaccess file, is one way to automatically serve [stylesheet].min.js if available and falls back to serve [stylesheet].js if not (tested with apache 2.4):

<IfModule mod_rewrite.c>
    RewriteEngine on
    Options +FollowSymLinks
    RewriteCond %{REQUEST_FILENAME} "^(.*)(\.css)$"
    RewriteCond %{REQUEST_URI} "!^(.*)(\.min\.css)$"
    RewriteCond %1.min.css -f
    RewriteRule "^(.*)(\.css)$" "$1.min.css"

Multi JavaScript Minimizer
HTML Minimizer