try GruntIcon - http://github.com/filamentgroup/grunticon
grunticon takes a folder of SVG files (usually the icons you have as in Adobe Illustrator) and displays them in CSS in 3 formats: SVG URLs, png data URLs and a third reserve CSS file with links to regular png- images that are also automatically generated and placed in a folder.
grunticon also generates a small piece of JavaScript and CSS for removal to your website, which asynchronously loads the corresponding CSS icon depending on the capabilities of the browser, and an HTML preview file with this script loader in place.
source share