CSSTidy is an open source CSS parser and optimizer with full CSS2 support. It is available as executable file (available for Windows, Linux and OSX) which can be controlled per command line and as PHP script (both with almost the same functionality).