CSS Sprite Generator

Glues icons into one file with ready-made CSS: class names from file names, an archive with the sprite, styles and an example. Everything runs in your browser, nothing is uploaded.

Drag images here — up to 50 at a time or click to choose files — PNG, JPG, WEBP, SVG Files never leave your browser.

There are three layout options: compact, vertical, and horizontal. The compact layout packs the images as tightly as possible, while the vertical and horizontal layouts are handy when you plan to adjust the coordinates by hand.

Class names come from the source file names, so the structure stays recognizable in your markup: the file arrow-left.png produces the class .arrow-left. Renaming the images before combining them is easier than fixing the styles afterwards.

The sprite is built as a PNG or a JPG. PNG keeps transparency and works for icons placed over a colored background; JPG suits photographs and produces a smaller file, but it softens the edges of images that have no transparency.

The point of combining images is that the browser downloads one file instead of dozens. Modern protocols fetch files in parallel, so the time saving is smaller than it used to be. Still, a set of icons stays a single file that is easier to include and to update.

Rate this tool

Help us get better

Other tools