ZeroSprites

About

Zero wasted pixels, then and now

ZeroSprites is a CSS sprite sheet generator that aims for the smallest possible sheet.

The first ZeroSprites

The original ZeroSprites described itself as "a CSS sprites generator aimed at area minimization using algorithms used in the field of VLSI floorplanning". It was a bash script around two floorplanning tools and ImageMagick, with pngnq for 8-bit output and an optimiser for file size. The online tool closed on 30 October 2020. The command-line version, which needs Linux, is still on GitHub.

This version

The new ZeroSprites keeps the goal and drops the install. The packer is written in JavaScript and runs in your browser, so it works on any computer with a modern browser. It writes a PNG, a CSS file with one class per image, and a JSON frame map for game engines. How the packing works explains what it does and where it differs from the original.

Glowing pixel sprites packed edge to edge on a glass slab

Privacy

Your images never leave your device. The browser reads them, packs them and builds the downloads. This site sets no cookies and runs no analytics or advertising scripts. Fonts and scripts are served from zerosprites.com itself.

Credits

  • The original ZeroSprites idea and script, by its author on GitHub.
  • Rectangle packing research by Eric Huang and Richard Korf, and floorplanning research by Tung-Chieh Chen and Yao-Wen Chang. Full references are on How it works.
  • Type: Silkscreen by Jason Kottke, Space Grotesk by Florian Karsten, JetBrains Mono by JetBrains, all under the SIL Open Font License.

Open the studio