Skip to content
Run here 100% in your browser, no upload, no login

SVG Sprite Generator

Paste several SVG files, merge them into one sprite and copy the use snippets.

Each <svg> element in the box becomes one <symbol>. Ids are taken from the id attribute when present.

Paste one or more SVG documents

Sprite markup

Reference snippets

How to use it

  1. Paste one or more complete SVG documents into the input box. Each svg element becomes one symbol.
  2. Set an id prefix. It is used for icons that have no id attribute of their own.
  3. Leave the size option ticked if you want width and height removed so the icons scale with CSS.
  4. Press Build sprite and read the markup, then copy the reference snippets for your templates.
  5. Download the sprite as an .svg file and inline it at the top of your page body, or save it and reference it by path.

Common use cases

Why it stays private

Parsing and merging happen in your browser with a regular expression over the text you pasted. There is no upload, no account and no network request.

FAQ

Q: How are ids chosen? A: The tool reads the id attribute of each svg element when it has one. If the id is missing, or already taken by an earlier icon, the tool falls back to the prefix plus a running number.

Q: Why is the sprite hidden with display none? A: The sprite is only a library of symbols, so it should not paint anything itself. Keeping it inline but hidden lets every use element on the page resolve its reference without an extra request.

Q: Can I reference a symbol from an external file? A: Yes. Save the downloaded file in your project and use a full path such as href="/assets/sprite.svg#check". Some older browsers need a polyfill for external references, so inlining the sprite is the more compatible option.

Your data stays on this device

SVG Sprite Generator runs 100% locally. Everything you paste or drop is processed by your own browser and never transmitted. Nothing is stored on our servers — close the tab and it is gone.

Nothing you type is sent to a server, logged, or used for analytics. The page works even with your network disconnected after first load.