Tested tool guide
Tested browser tools
Checked August 16, 2026
What SVG Sprite Generator does, with a checked example
An icon set usually means many small SVG files. This tool takes the icons you paste and packs them into one sprite: a single SVG document whose symbols each hold one icon, addressable by id. Pages then draw an icon with a one-line reference instead of re-inlining its markup, and the browser fetches one file instead of many. The part people get wrong is the viewBox: it must travel from each source icon onto its symbol, or the icon cannot scale. The generator carries it over, but an icon pasted without a viewBox gives the sprite nothing to scale by.
Worked example
A concrete input and expected output from the current implementation.
Input
<svg viewBox="0 0 24 24"><circle cx="12" cy="12" r="9"/></svg>
<svg viewBox="0 0 24 24"><path d="M12 4l8 12H4z"/></svg>
->
Expected output
<svg xmlns="http://www.w3.org/2000/svg" style="display:none">
<symbol id="icon-1" viewBox="0 0 24 24"><circle cx="12" cy="12" r="9"/></symbol>
<symbol id="icon-2" viewBox="0 0 24 24"><path d="M12 4l8 12H4z"/></symbol>
</svg>
Each pasted icon becomes one <symbol> carrying its original viewBox and inner markup, so the drawing still scales inside any <use>. Ids are assigned in paste order; the root stays hidden because a sprite renders nothing until a use element references a symbol.