Start a project

Tool 73 of 194 · Images

SVG Symbol Sprite Builder

Build an SVG icon sprite that works first time: no clashing ids, no missing gradients, icons that take the text colour.

SVG Symbol Sprite Builder

Your icons

Preview

    Sprite

    SVG sprite

    Using an icon

    use snippets

    Each icon

    IconSymbol idviewBoxids prefixedColour

    01

    What it does

    Turns your SVG icons into one symbol sprite: ids prefixed so they can't clash, gradients moved where they render, scripts removed and colours set to currentColor.

    • One symbol per icon, with its viewBox kept (or made from width and height)
    • Every id prefixed per icon, with url(#), href and aria references rewritten
    • Gradients, clip paths and masks moved to shared defs, where hidden sprites still render them
    • Colours to currentColor for single-colour icons, every icon, or none

    02

    Private by design

    Everything happens in your browser. Nothing you type, paste or upload is sent anywhere, and it keeps working offline once the page has loaded.

    03

    What you get

    The sprite, use snippets, a preview of every icon and what was changed, with a Copy and a Download button on every result.

    • SVG sprite
    • Icons
    • symbol
    • SVG

    Why it matters

    An SVG sprite puts all your icons into one file of symbol elements, and each icon on the page is a small svg with a use element pointing at one. It's the lightest way to ship an icon set, and icons can take the surrounding text colour. Built by hand, though, sprites break in quiet ways: two icons exported with the same gradient id (they all seem to be called "a"), a gradient that vanishes because the sprite is hidden with display: none, or an icon that ignores CSS colour because its fill is hard-coded.

    This builder fixes those as it goes. Every id is prefixed with its icon's name, and every url(#id), href and aria reference is rewritten to match. Gradients, clip paths and masks move into one shared defs block, and the sprite is hidden in a way that keeps them rendering. Icons with a single colour switch to currentColor, so they follow your CSS. Scripts and event handlers are stripped. The preview draws each icon from the finished sprite, so what you see is what you ship.

    How to use it

    1. Drop your SVG files, or paste them with a comment line naming each.
    2. Choose the id prefix and when to use currentColor.
    3. Check the preview and the notes.
    4. Copy the sprite into your page or save it as a file, and use the snippets.

    FAQ

    Why do gradients disappear in my sprite?

    If the sprite is hidden with display: none, Chrome and Firefox don't render gradients defined inside it. This builder moves them to shared defs and hides the sprite with zero size instead.

    Inline sprite or external file?

    Inline (pasted into the page) works everywhere and has no extra request. An external file can be cached, but it has to be on the same origin to work with use.

    Why weren't my multi-colour icons changed to currentColor?

    Because that would make them one colour. By default only single-colour icons switch. Choose Every icon to change them all.

    Are my files uploaded?

    No. They're processed in your browser.

    Work with me

    Want a site that gets these right?

    I build fast, accessible websites and web apps that pass these checks from day one. Tell me about your project and I'll reply personally with honest next steps.

    All developer tools · Back to leej.uk