Icon Sprite Generator

Combine icons into one SVG sprite with symbol IDs and get the HTML to use them. Use the icon library or your own SVG files.

Runs in your browserNo sign-upWorks offline

What the Icon Sprite Generator does

The Icon Sprite Generator combines many icons into one SVG file of symbols, called a sprite. Each icon gets an ID you can use anywhere on your site with a short <use> tag, so a page loads one small file instead of many. Pick icons from the Kitlantis library, add your own SVG files, set an ID prefix, and copy or download the sprite.

How to use it

  1. Select icons from the grid, and add your own SVGs with Add your own SVG files.
  2. Set an ID prefix, such as icon-.
  3. Copy or download sprite.svg.
  4. Follow the usage snippet: include the sprite once, then show any icon with <svg><use href="#icon-home"/></svg>.

Example

A website uses six icons in its header and footer. Select home, search, user, mail, heart and settings, keep the icon- prefix, and download a sprite of about 1.6 KB. Put it near the top of the body, then write <svg width="24" height="24"><use href="#icon-search"/></svg> wherever the search icon is needed.

Why use a sprite

A sprite is one file the browser downloads once and caches, instead of one request per icon. Icons drawn with <use> inherit the CSS color of their surroundings, so you can colour them on hover or in dark mode with plain CSS.

Uploaded SVGs are cleaned of scripts and links to other sites before they are added. Duplicate names get a number added so every ID stays unique.

Questions people ask

Are my files uploaded?

No. Files are read and processed in your browser and never uploaded.

Inline sprite or separate file?

Inline is simplest and works everywhere. A separate file on the same site can be cached across pages: use href="/sprite.svg#icon-name".

Why does my icon not show?

Check that the ID in the use tag matches the symbol ID, including the prefix.

Can I use it with React?

Yes. Render the sprite once in your layout and use <use href="#id"/> in components.

Related tools