CSS code clean/tidy/reformatting utility

Posted on 2006-06-06
Last Modified: 2008-01-09
Does anyone know of a utility that will clean up CSS?

I have a large CSS file that I'd like to reformat to remove all comments,  place all styles on a single line,  etc.   The purpose is to speed up loading of the site - we'll make changes to the 'source' file and ship the output file.

I'd prefer a utility that I could download and run locally.  It could be a DreamWeaver extension.

Question by:GlennGilbert
    LVL 3

    Author Comment

    Found a couple of on-line code reformat/compression utilities.

    One did't work ( - this took all the styles and *severely* optimised the code.  I guess it'll work for smaller stylesheets and will result in really compressed files.

    The one that worked well was  Dodgy domain name,  but good utility.  It just about halved the size of the source code (which had lots of comments).

    Any other recommendations for the points?

    LVL 13

    Accepted Solution


    ...has been around for a while, but is perhaps more of an optimiser than tidier...

    I've also come across>

    ...recently, but not tried it yet...


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Javascript: Crash Course

    Javascript is not only emerging as the most important language to know, it's flexibility is unique. With Javascript being deployed on the web, mobile and even the desktop this is the one language that all technologists need to know.

    Introduction A frequently asked question goes something like this:  "I am running a long process in the background and I want to alert my client when the process finishes.  How can I send a message to the browser?"  Unfortunately, the short answer …
    Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
    In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
    In this tutorial viewers will learn how to style rounded corners for elements in CSS using the border-radius property Begin with a normal styled element such as a div: To style all four corners of the div to be the same degree of roundness, use the …

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now