Select Page

How to Export Icon Sets for Developers: SVG, PNG and Icon Font Formats Explained

by | Nov 19, 2026 | Uncategorized

Most icon handoffs fail for the same three reasons: messy vector paths, inconsistent file names, and the wrong export format for the platform. The developer opens the folder, finds ic_arrow copy 2.svg next to a 48 KB SVG full of clip paths, and the Slack thread starts. This guide shows you how to export icons for developers in a way that goes straight into the codebase: no cleanup, no renaming, no revisions.

At Osilly we ship icon sets for web apps, iOS and Android products every month. The workflow below is the one we actually use, condensed into a repeatable checklist you can apply to any project.

Why icon handoff breaks down (and what developers actually need)

Designers think in artboards. Developers think in assets, build pipelines and bundle size. The gap between those two mental models creates predictable friction points:

  • Unoptimized SVG markup with editor metadata, nested groups, transforms and hardcoded fills that cannot be recolored with CSS.
  • Inconsistent sizing, where one icon is drawn on a 24 px grid and the next on a 23.4 px bounding box, so everything looks misaligned in a button row.
  • Random file names that break autocompletion and make icon components impossible to generate automatically.
  • Missing densities on mobile, forcing developers to upscale PNGs or request a second export round.
  • No source of truth, so nobody knows whether the SVG in the repo or the frame in the design file is current.

Developers need three things from you: predictable geometry, predictable names, and the right format per platform. Everything below serves those three goals.

icon design export

Step 1: Clean up vector paths before you export anything

An icon that is not clean in the design file will never be clean in the export. Fix the geometry first.

Normalize the canvas and grid

  • Draw every icon on the same square frame: 24 x 24 px for web and Android UI icons, 16 x 16 px for dense data tables, 20 x 20 px for compact toolbars.
  • Keep a consistent live area and padding, typically 2 px of padding inside a 24 px frame. This is what makes icons optically aligned next to text.
  • Snap all coordinates to whole pixels. Half pixel values produce blurry PNG exports and ugly rendering at small sizes.

Flatten and simplify the geometry

  1. Outline all strokes unless you intentionally ship stroke-based icons for animation. Outlined paths scale predictably and never surprise anyone with a 1.5 px stroke that becomes 3 px at 2x.
  2. Merge overlapping shapes with a boolean union so the icon is a single path where possible.
  3. Remove masks and clip paths. They triple the SVG markup and often break in older rendering engines.
  4. Delete hidden layers, guides, construction circles and background rectangles. Transparent background rects are the most common cause of oversized bounding boxes.
  5. Reduce node count. A chevron needs three points, not eleven. Fewer nodes means smaller files and cleaner rendering.
  6. Use a single fill color, usually pure black (#000000) or a neutral, so it can be overridden with currentColor in code.
  7. Expand text to outlines if any icon contains lettering. Fonts do not travel with SVG files.

Quick test: select the icon, check that the bounding box is exactly the frame size, and confirm the layer panel shows one or two vector layers. If you see a group of six nested frames, it is not ready for handoff.

Step 2: Name files consistently (this is the part developers care about most)

File names become variable names, component names and asset keys. Inconsistent naming is the single biggest reason developers ask for a re-export.

A naming convention that works everywhere

Use lowercase kebab-case for web, with an optional category prefix and a state or variant suffix:

icon-arrow-left.svg
icon-arrow-right.svg
icon-user-filled.svg
icon-user-outline.svg
icon-notification-badge.svg

Rules that keep the set predictable:

  • No spaces, no uppercase, no accents, no parentheses.
  • Noun first, modifier second: arrow-left, not left-arrow. This groups related icons alphabetically.
  • Use semantic names, not visual ones where the meaning is fixed: icon-delete is better than icon-trash-can if the action may change its visual later. Use visual names for generic shapes.
  • Keep variant suffixes from a closed list: -outline, -filled, -duotone, -disabled.
  • Never version in the file name. No -v2, -final, -new. Git handles versions.

Platform naming differences

Platform Convention Example
Web / React / Vue kebab-case icon-arrow-left.svg
Android snake_case, lowercase only ic_arrow_left.xml / ic_arrow_left.png
iOS asset catalog camelCase or kebab-case, density suffix [email protected]
Icon font kebab-case glyph name .icon-arrow-left

Pro tip: name the layers and components in your design file exactly as the exported files should be named. In Figma, the layer name becomes the file name on export, so naming discipline inside the file removes an entire manual renaming step.

icon design export

Step 3: Choose the right format per target

There is no single best format. There is a best format per platform and per use case.

Format Best for Recolorable Watch out for
SVG Web, React Native, design systems, anything that scales Yes, with currentColor Bloated markup if not optimized
SVG sprite Large web icon sets with many repeats per page Yes Needs a build step and unique symbol IDs
PNG @1x / @2x / @3x Native iOS, legacy Android, email, app store assets Only via template rendering Fixed size, three files per icon
Icon font Legacy codebases, CMS templates, email clients with font support Yes, via color property Accessibility issues, single color only, FOIT flash
PDF (iOS vector) Xcode asset catalogs with vector preserved Yes, as template image Single path only, no gradients
Vector Drawable XML Android native Yes, via tint Converted from SVG, no unsupported features

Our default recommendation in 2026

Ship optimized SVG as the single source of truth, then derive everything else from it. SVG converts cleanly into Vector Drawable for Android, into PDF or SF Symbols style assets for iOS, into PNG densities for anything raster, and into a font if a legacy system demands it. Icon fonts are no longer the default choice for new projects because of accessibility and single color limitations, but they remain useful for older stacks.

Step 4: How to export SVG icons developers will not rewrite

Export settings

  • Export at 1x. SVG is vector, scaling the export only inflates the coordinate numbers.
  • Enable “Include id attribute” only if your build needs IDs for sprites. Otherwise turn it off.
  • Turn off “Outline text” only after you have already expanded text manually.
  • Disable editor-specific metadata, comments and DOCTYPE declarations.

Optimize the markup

Run every SVG through an optimizer such as SVGO or an equivalent plugin before handoff. A typical 24 px icon should end up between 200 and 600 bytes. If it is 5 KB, something is wrong.

A clean export looks like this:

<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
  <path d="M15 18l-6-6 6-6" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>

Checklist for each SVG file:

  • A viewBox is present and matches the design grid.
  • Width and height are set, or deliberately removed if your CSS controls sizing.
  • Fill or stroke uses currentColor so developers can theme it.
  • No <g> wrappers with transforms, no <defs> unless genuinely needed.
  • No inline style="" attributes.
  • Path data uses relative commands and reasonable decimal precision (two decimals is plenty).

When to deliver an SVG sprite

If the set is larger than roughly 30 icons and they repeat across pages, deliver a sprite file with <symbol> elements plus the individual SVGs. Give each symbol an ID that matches the file name. Developers can then reference icons with a single line and the browser caches one request instead of fifty.

Step 5: Exporting PNG at @2x and @3x correctly

Raster exports still matter for native apps, app store listings, email templates and anything rendered outside a browser.

Density reference table

Scale iOS suffix Android folder 24 px icon exports at
1x (none) drawable-mdpi 24 x 24 px
1.5x (none) drawable-hdpi 36 x 36 px
2x @2x drawable-xhdpi 48 x 48 px
3x @3x drawable-xxhdpi 72 x 72 px
4x (rare) drawable-xxxhdpi 96 x 96 px

Raster export rules

  1. Always export from the vector source, never upscale a smaller PNG.
  2. Keep the transparent background and avoid baked-in shadows unless the spec requires them.
  3. Use PNG-24 with alpha for icons with soft edges, PNG-8 only for flat single color shapes where file size matters.
  4. Run a lossless compressor (ImageOptim, Squoosh, oxipng) on the whole folder before zipping.
  5. Mirror the folder structure the developer expects, so assets can be dropped in without reorganization.

Suggested delivery structure:

/icons
  /svg
    icon-arrow-left.svg
    icon-user-filled.svg
  /png
    /1x
    /2x
    /3x
  /android
    /drawable-mdpi
    /drawable-xhdpi
    /drawable-xxhdpi
  /font
    icons.woff2
    icons.css
    preview.html
  README.md
icon design export

Step 6: Building an icon font (and when not to)

An icon font packs every glyph into a single typeface file. It is still a legitimate option for CMS themes, email templates and older enterprise codebases where a build pipeline for SVG does not exist.

How to prepare icons for a font

  • Every icon must be a single filled path. Strokes must be outlined, overlaps unified.
  • All icons must sit on an identical square canvas, typically 1000 x 1000 units once converted to font metrics.
  • Fonts are monochrome. Multi-color icons cannot be included.
  • Assign glyphs to the Private Use Area (U+E000 onwards) so they do not collide with real characters.
  • Keep the codepoint map stable between versions. Reassigning codepoints silently swaps icons across the entire product.
  • Deliver WOFF2 as the primary format, plus a CSS file with the class names and a static HTML preview page.

Accessibility notes

Icon fonts are read as characters by screen readers unless handled properly. Tell developers to apply aria-hidden="true" to decorative glyphs and provide visually hidden text for meaningful ones. If accessibility is a priority, recommend inline SVG with a <title> element instead. For new projects in 2026, inline SVG is the better default.

The complete icon export checklist

Run through this before every handoff. It takes five minutes and removes almost all revision requests.

Geometry

  • All icons on the same square grid with consistent padding
  • Strokes outlined, shapes unioned, masks removed
  • Coordinates snapped to whole pixels
  • Hidden layers and background rectangles deleted
  • Optical alignment checked at 16 px and 24 px

Naming

  • Lowercase kebab-case (or platform convention)
  • Noun first, variant suffix from a closed list
  • No versions, no duplicates, no copy suffixes
  • Layer names in the design file match export names exactly

Export

  • SVG optimized, viewBox present, currentColor applied
  • PNG exported at 1x, 2x and 3x from vector source
  • Android vector drawables or density folders included if native
  • Font files delivered as WOFF2 with a stable codepoint map
  • Everything losslessly compressed

Documentation

  • README with grid size, stroke weight, color rules and licensing
  • Preview page or contact sheet showing every icon with its name
  • Changelog listing added, renamed and removed icons
  • A clearly stated source of truth (design file link or repo path)
icon design export

Automating the handoff

Manual exports do not scale past a few dozen icons. Once your set stabilizes, automate:

  1. Bulk export plugins handle batch SVG output and naming directly from your design tool selections.
  2. SVGO in a pre-commit hook optimizes every SVG added to the repo, so cleanup never depends on the designer remembering.
  3. Icon component generators (SVGR for React, unplugin-icons for Vue, and equivalents) turn a folder of SVGs into typed components automatically.
  4. Design token sync keeps icon size and color tokens aligned between design file and code.
  5. CI checks can fail a build if a file name breaks the naming convention or an SVG exceeds a size threshold.

The goal is simple: the designer updates the icon in the source file, and the correct SVG, PNG and font assets appear in the repository without a single manual step.

Common mistakes to avoid

  • Exporting icons at different frame sizes. A 20 px icon in a 24 px set will look broken in every button.
  • Hardcoding brand colors in SVG. Use currentColor and let the theme decide.
  • Sending a ZIP by email. Put assets in the repository or a shared asset pipeline so there is one version.
  • Renaming icons between releases without a changelog. It silently breaks production code.
  • Delivering only PNG for a web project. Raster icons on a responsive site in 2026 are a regression.
  • Ignoring dark mode. Confirm every icon stays legible on both light and dark surfaces.

FAQ

What is the best format to export icons for developers?

Optimized SVG is the best default for web and most cross platform work because it scales, recolors with CSS and stays tiny. Export PNG at @2x and @3x alongside it when the target is a native iOS or Android build, and only use an icon font when the existing codebase requires it.

Should I still export @1x PNG icons?

For modern mobile apps, @2x and @3x cover nearly all devices, but asset catalogs and some build systems still expect a 1x slot. Including 1x costs almost nothing and avoids a follow up request, so we ship all three by default.

How do I make SVG icons recolorable in code?

Replace fixed fill or stroke values with currentColor. The icon then inherits the CSS color of its parent element, so developers can theme it, apply hover states and support dark mode without touching the file.

Are icon fonts still a good idea in 2026?

They are acceptable for legacy systems, CMS templates and email, but they are no longer the recommended default. They are single color, they create accessibility problems with screen readers, and they can flash during font loading. Inline SVG or an SVG sprite is the better choice for new builds.

How big should an exported SVG icon be?

A well optimized 24 px icon usually weighs between 200 and 600 bytes. Anything above 2 KB normally means leftover groups, masks, metadata or excessive decimal precision in the path data.

How should I name icon files for a design system?

Use lowercase kebab-case, noun first, with a short variant suffix: icon-arrow-left.svg, icon-user-filled.svg. Keep the design file layer names identical to the exported file names so exports and code components stay in sync automatically.

What should be included in the handoff package?

Optimized SVGs, PNG densities if needed, platform specific assets, a README describing the grid and color rules, a visual preview of the full set, and a changelog of added, renamed and removed icons.

Final thoughts

Clean paths, consistent names, correct formats, clear documentation. That is the entire job. When you export icons for developers with those four things in place, implementation becomes a drag and drop task instead of a negotiation, and your icon set stays consistent as the product grows.

Need help building or auditing an icon system for your product? Get in touch with the Osilly team and we will set up a handoff pipeline your developers will actually enjoy using.

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *