Skip to content

CSS Sprite Sheet Generator

Combine up to 100 images into one sprite sheet and get the CSS classes with each image's size and background position, plus a preview page, in a ZIP. Useful for icon sets, game sprites and reducing image requests.

Choose files or drag and drop them into the upload field. Maximum file size: 5 MB.

Reset

Frequently asked questions

How are the images arranged?

In a grid. Each cell has the size of the largest image, and you can set the number of columns and the padding between cells. Without a column count, the grid is roughly square.

What does the CSS look like?

A base class with the sprite image, and one class per image named after its file name, such as .sprite-home, with width, height and background-position.

How do I use the sprites?

Add both classes to an element, for example <span class="sprite sprite-home"></span>. The included index.html shows every sprite.

Are images resized?

Images larger than 1024 pixels on a side are scaled down to fit; smaller ones keep their size.

Why use sprites today?

HTTP/2 makes many small requests cheaper, but sprites still help for game animations, email templates and pages with many tiny icons.

What does the prefix do?

It sets the class name prefix, sprite by default, so the classes do not clash with your other CSS.

About OneClick Pro

OneClick Pro is a free collection of more than 150 web tools for everyday work: converting images and units, formatting and validating code, checking domains and SEO, and working with text, dates and numbers. Every tool runs without registration or subscription, and what you enter is only used to calculate your result and is never stored. Use it as a quick toolbox for one-off tasks, or bookmark the tools you rely on every day.