Image Sprite Generator

Combine icons and images into one sprite sheet PNG, in a row, column or grid, with the CSS classes and background positions to show each one.

Processed on your device. Files are not uploaded

How to make a CSS sprite

  1. Add the images

    Drop in icons or images; each file name becomes a CSS class.

  2. Choose the layout

    A row, a column or a grid, with space between images.

  3. Download the sheet and CSS

    Use the classes in your HTML to show each image.

When to use Image Sprite Generator

A page shows dozens of small images such as flags or game tiles, and each one is a separate request.

An HTML email or legacy page needs icons as background images with exact positions.

Tips for a better Image Sprite Generator result

Name files after what they show before adding them, since the file names become the CSS class names.

Use images of the same size in a grid layout, which keeps the sheet compact and the CSS easy to read.

Image Sprite Generator: limits and what to check

Large photos in a sprite make every page load all of them, so keep sprites to small images used together.

The PNG sheet loses SVG sharpness when scaled, so draw SVG icons at the size they will be shown.

About Image Sprite Generator

Combine many small images into one sprite sheet, so a page loads one file instead of dozens. The CSS gives each image a class with its size and background position, and the retina option halves the sizes so 2x images stay sharp on high-density screens.

FAQs

Are sprites still useful?

For many small raster images, yes: one request and one cache entry. For icons, SVG sprites are often a better fit.

Why add space between images?

Scaling and rounding can let a neighbour bleed into view. A few pixels of space prevents it.

What does the retina option do?

It treats the images as 2x and halves the CSS sizes, so they are drawn at half size and look sharp on high-density screens.

Related tools