PerfectVector
By Irene Kim11 min read

Convert PNG Icons to SVG for a Consistent UI Kit

Turn a folder of PNG icons into a coherent SVG set. Learn how to standardize artboards, optical size, colors, paths, and delivery checks across a UI kit.

On this page

Do not convert the whole folder in one pass. Start with a small group that includes your simplest icon, your busiest icon, a curved shape, and any icon with a cutout. Define the SVG rules with that sample, then apply them to the rest of the set. This catches bad tracing decisions before they spread across dozens of files.

The conversion itself is only one step. A usable UI kit also needs a shared coordinate system, consistent optical size, predictable color behavior, editable paths, and a delivery check in the product that will use the icons.

The short workflow
  1. Inventory the PNG set and find duplicates or missing sources.
  2. Choose representative icons and define the common grid, padding, fill or stroke model, and color rules.
  3. Convert the sample icons into real paths.
  4. Inspect silhouette, nodes, negative space, and color regions.
  5. Normalize the set in one vector editor, then convert and review the remaining icons.
  6. Test the exported SVGs in the actual UI and asset pipeline.

Decide which PNG icons should become SVG

Flat icons with clear boundaries are strong tracing candidates. Other images need a different route. Sort the folder before you open a converter.

Source iconRecommended routeWhy
Flat monochrome or limited-color iconTrace to SVG, then normalizeThe visible design already consists of clean shapes
Pixel-art iconKeep the raster grid or redraw deliberatelyAutomatic smoothing can erase the intended pixel structure
Gradient, glow, or textured iconKeep it raster or simplify the art firstTracing can split continuous detail into many small shapes
Icon with live textFind the original design file or redraw the letteringTracing turns text into outlines and does not recover the font
PNG exported from an existing vectorFind and re-export the original SVGRe-tracing throws away the cleaner source geometry

An SVG filename does not prove that the pixels became vector paths. The format can legally contain an embedded raster image through an <image> element, as the SVG embedded-content specification explains. If an exported file still selects as one rectangular image or gets blocky at deep zoom, use the embedded-raster checks before adding it to the kit.

Set the UI-kit rules before you trace

A folder of individually clean icons can still look inconsistent together. Write down the set rules first, even if the original PNGs do not follow them yet.

Choose one coordinate space

Use one viewBox for icons that should share a component size. The numbers do not have to be 24 by 24 or 16 by 16; they need to match your system. SVG maps the viewBox rectangle into the displayed viewport, so identical outer dimensions only help when the artwork is positioned consistently inside them. The SVG 2 coordinate-system specification defines that mapping.

Record:

  • the common viewBox;
  • the intended visual center and baseline;
  • minimum internal padding;
  • which parts may intentionally extend beyond the usual optical bounds.

Choose a fill or stroke model

Decide whether the family is built from filled silhouettes, live strokes, or a documented mixture. A stroke-based outline set needs consistent cap, join, and apparent weight. A filled set needs consistent negative spaces and edge treatment. Tracing can turn a thin stroke into a closed outline, so inspect the geometry rather than relying on the preview.

Decide how color will be controlled

For a single-color system, use a repeatable color rule that the destination can map to its icon token. For multi-color icons, define the allowed palette and which regions may change. Do not keep tiny near-duplicate colors left by anti-aliasing unless they serve a visible purpose.

Convert a representative sample first

Pick four to six icons that expose the hard cases. Include a circle or arc, a diagonal, a small counter or hole, and the densest icon in the family. If the set uses multiple colors, include one of those too.

1. Prepare the PNGs

Use the cleanest export available. Remove accidental background rectangles, crop consistently, and avoid enlarging a small blurry source just to create more pixels. The source-preparation guide for converting PNG to SVG without losing quality covers the trace-specific details.

Keep an untouched copy of every original. Cleanup is easier to judge when you can compare the SVG with the source instead of relying on memory.

2. Trace the sample icons

Use an automated vectorizer or the tracing tool in your design software. Illustrator's current Image Trace workflow exposes controls for color, paths, corners, and noise. Figma's current Vectorize feature offers color modes after tracing and notes that complex or low-resolution images may not vectorize well (Adobe Image Trace; Figma Vectorize).

For a browser-based route, upload the sample to PerfectVector's PNG-to-SVG converter. Compare the preview with the original, inspect the shapes and color regions, then download the SVG you want to normalize in your vector editor. Run the representative group before committing the rest of the folder.

3. Inspect the paths, not only the preview

Open each result in a vector editor and select the shapes. SVG paths are built from commands and coordinates, including line and curve segments defined in the SVG 2 path specification. You want enough nodes to preserve the silhouette, with no universal target number.

Look for:

  • dense chains of nodes around a simple curve;
  • stray specks or background rectangles;
  • overlapping copies of the same edge;
  • tiny color fragments caused by anti-aliasing;
  • holes or counters that closed during tracing;
  • one raster rectangle instead of selectable paths.

If a simple shape is buried under points, use the too-many-nodes diagnosis before simplifying it. Aggressive cleanup can move corners and close small spaces, so compare the edited path with the PNG.

Normalize the icons as one family

Once the sample traces are structurally sound, place them on the shared grid and review them together. This is where a set becomes a system.

Set-level review
Conceptual workflow showing mismatched PNG icons becoming a coordinated SVG icon family on one shared grid
Conceptual illustration: trace representative icons first, then normalize the full family against one grid and one set of rules.

Check the set at its real interface size and at a larger editing zoom:

CheckWhat to compare across the setCommon failure
Coordinate spaceSame viewBox and intended placementIcons jump or scale differently in one component
Optical sizePerceived mass, not only bounding-box widthA thin icon looks smaller than a dense icon
AlignmentBaseline, center, and intentional overshootCircles and pointed shapes appear low or off-center
WeightStroke width or filled-edge thicknessOne icon feels darker than its neighbors
Corners and curvesRadius language and tangent qualitySome corners are crisp while others look swollen
Path structureSelectable shapes and manageable nodesOne file is difficult to edit despite looking correct
Color behaviorApproved palette and token mappingNear-duplicate fills make recoloring unpredictable
NamingStable component and file namesDuplicate or ambiguous assets reach the handoff

Optical correction is allowed. A circle may need to extend slightly beyond the box that contains a square so both appear the same size. The rule is consistent perception, backed by a documented grid, rather than forcing every shape into identical geometric bounds.

What this looks like with PerfectVector

PerfectVector fits the tracing stage between source preparation and set normalization. Use it to rebuild a representative PNG sample as editable vector shapes, then judge the output on the criteria that matter to this kit:

  1. Does each icon preserve its silhouette and negative spaces?
  2. Can you select and recolor the intended regions?
  3. Do the curves use a manageable set of nodes?
  4. Is the result easier to normalize than a manual or app-native trace?

If the sample passes, convert the remaining suitable PNGs and bring them into the same master file for the set-level review. If it fails, change the source or tracing method before processing more icons. PerfectVector does not replace the optical-alignment and naming decisions that belong to the design system.

Clean up without losing the source

Keep two layers of files:

  • Source archive: untouched PNGs, any original design files, and notes about provenance.
  • Editable master: normalized vector icons on the shared grid.
  • Delivery exports: the optimized SVGs consumed by the product.

Make shape edits in the master, then regenerate the delivery files. Avoid hand-editing separate exports because fixes will drift across copies. If an SVG needs recoloring, reshaping, or canvas correction, use the SVG editing workflow and return the corrected geometry to the master set.

Before handoff, test a few icons in every environment that matters: the design library, the application component, and any build or optimization step. Check disabled and inverse-color states if the system uses them. A structurally clean file can still fail the kit if its color or sizing assumptions do not match the component.

UI-kit delivery checklist

  • Every traced icon came from the cleanest available source.
  • Icons share the documented viewBox, padding, and alignment rules.
  • Optical size and apparent weight are consistent at the real UI size.
  • Filled and stroked icons follow the system's stated model.
  • Color regions map predictably to the approved palette or token rule.
  • Curves use enough nodes for fidelity without obvious path clutter.
  • No SVG contains an accidental embedded raster, background box, or duplicate edge.
  • File and component names are unique and stable.
  • The exported set has been tested after the product's normal optimization step.
  • The source archive, editable master, and delivery files are kept separate.

FAQ

Can I batch-convert all PNG icons before cleaning them up? You can, but a representative sample is safer. Convert a few icons that cover the set's hardest shapes, establish the grid and path rules, and only then process the rest. Otherwise, one bad tracing choice can create repetitive cleanup across the whole folder.

Should every SVG icon use the same viewBox? Icons that share one UI component usually benefit from the same viewBox, but the artwork inside it may need optical adjustment. Keep the coordinate space consistent while allowing circles, pointed shapes, or unusually dense icons to use documented overshoot or padding changes.

How many nodes should a UI icon have? There is no universal number. Use the fewest nodes that preserve the intended silhouette, corners, and negative spaces. Compare icons of similar complexity and investigate any simple curve that contains a dense chain of points.

Should I keep PNG icons after the SVG set is finished? Yes. Keep the original PNGs and any earlier design sources in an archive. They provide provenance and a visual reference when a trace needs to be redone. Use the normalized vector master for edits and generate delivery SVGs from that master.

Sources

  1. W3C — SVG Coordinate Systems, Transformations and Units — Defines SVG viewports, coordinate systems, viewBox, and how artwork maps into a displayed region.
  2. W3C — SVG Paths — Defines the line and curve commands that make up editable SVG path geometry.
  3. W3C — SVG Embedded Content — Confirms that SVG can contain raster image content rather than vector paths.
  4. Adobe Illustrator — Vectorize images using Image Trace — Documents the current raster-tracing workflow and editable-path output.
  5. Figma Learn — Convert static images to vector layers — Documents Figma's current Vectorize workflow, color modes, and source-image limitations.

Start with the hardest few icons, not the entire folder. Convert the sample PNGs to SVG, inspect their paths and color regions, then normalize the winning result against your UI-kit rules before you scale the workflow.

More from the blog

Turn your logo or artwork into a
clean, editable SVG