Developer

Runs in your browser. No file uploads for processing.

Build an SVG Icon Sprite From Paths

Turn clean SVG path data into named symbols with a shared currentColor paint and ready-to-use HTML references.

Loading tool...

How to create an SVG icon sprite

  1. Add path data, IDs and ViewBoxes

    Give each icon a unique lowercase ID and the four ViewBox coordinates. Paste the contents of each d attribute on a separate line, not whole SVG markup.

  2. Preview the symbols

    Solid fill, even-odd fill, and round stroke use currentColor. For example, square and arrow with a demo prefix become demo-square and demo-arrow.

  3. Download the sprite and use an icon

    Inline the sprite once and use the fragment reference, or serve icons.svg from the same origin and choose its filename reference. The download contains definitions only; it is not a preview sheet.

Use cases

  • Bundle a collection of UI icons in reusable symbols without adding an icon runtime.
  • Prepare a tiny sprite and matching reference snippets for a static website.

Limits and privacy

  • 1–24 icons, up to four path lines per icon and 12,000 segments total. Only path geometry, bounded ViewBoxes and fixed color modes are supported. No arbitrary SVG, CSS, images, transforms, gradients, or animation imports.
  • The default snippet is decorative. Supply accessible names for icons that carry meaning. Prefix other sprite IDs to avoid collisions when combining sets in one page.

The tool processes inputs in your browser. Account features and usage analytics are separate.

Frequently asked questions

Can I measure an icon’s path before bundling it?

Use SVG Path Clinic to inspect an individual path’s commands and bounds. This tool groups already cleaned path data into reusable SVG symbols.

Why does icons.svg look empty when opened alone?

The file contains symbol definitions. They render when instantiated by a use element; the builder’s preview shows the underlying geometry.

Can I paste a whole SVG file?

No. Paste only each path’s d value and specify a ViewBox. Whole documents and arbitrary attributes are rejected.

How do I change the icon color?

The generated paint uses currentColor. Set the CSS color on the SVG or its parent to recolor a fill or stroke.

Are icons uploaded to make the sprite?

No. Validation, preview, SVG serialization and download all happen in your browser.

Can two icons share a symbol ID?

No. Duplicate IDs within the set are rejected. Use a prefix to avoid conflicts with another inline sprite or page markup.

Should I use an inline or external sprite?

Inline markup uses a fragment like #demo-arrow. A separate file uses a reference like icons.svg#demo-arrow and should be served from the same origin as the page.

Related tools