Practical Guide

CSS Sprite Generator — Usage Guide and Technical Principles

Pack images at their original size into a transparent PNG sprite sheet. Preview positions and download matching CSS and JSON coordinates.

Open tool

Overview

Pack images at their original size into a transparent PNG sprite sheet. Preview positions and download matching CSS and JSON coordinates. Images are packed in selection order, one row at a time. When an image does not fit, it starts the next row. Animated input is exported as a static image.

Key concepts

Generate sprite

Images are packed in selection order, one row at a time. When an image does not fit, it starts the next row. Animated input is exported as a static image.

Features

CSS Sprite Generator

Pack images at their original size into a transparent PNG sprite sheet. Preview positions and download matching CSS and JSON coordinates.

Generate sprite

Images are packed in selection order, one row at a time. When an image does not fit, it starts the next row. Animated input is exported as a static image.

Use cases

Load sample

Load three sample shapes, then change the width or gap to try a different layout.

Download ZIP

Keep the PNG and CSS together to use the generated classes on a web page, or read the JSON rectangles in an asset pipeline.

Frequently asked questions

Generate sprite?

Images are packed in selection order, one row at a time. When an image does not fit, it starts the next row. Animated input is exported as a static image.

Download ZIP?

Keep the PNG and CSS together to use the generated classes on a web page, or read the JSON rectangles in an asset pipeline.

Related Documents

  • Canvas API

    Pack images at their original size into a transparent PNG sprite sheet. Preview positions and download matching CSS and JSON coordinates.

  • CSS background-position

    Keep the PNG and CSS together to use the generated classes on a web page, or read the JSON rectangles in an asset pipeline.

CSS Sprite Generator

Open the tool to try these features.

Open tool