A 24px search icon left the same Figma file twice in one week. The first export weighed 34KB, and at 20px in the app header the magnifier handle dissolved into a grey smear. The second weighed 1.9KB and stayed sharp in a favicon and a 96px empty state. Nobody redrew an anchor point between them.
Bad SVGs from Figma are rarely drawing problems. Three checkboxes decide what the file can do, two habits decide how much junk rides along, and the fix is usually ten seconds of reading the file instead of squinting at a browser tab.
What Figma actually writes into an SVG
Figma does not trace artwork. It translates nodes into elements: frame to group, vector to path, text to text, image fill to an image element with the bitmap pasted inline as base64. Whatever nesting exists in the layers panel lands in the file. A 24 by 24 icon inside a 400px frame exports as four elements drawing one line – group, clip path, background rectangle, and the path you wanted.
<svg width="288" height="288" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_12_88)">
<path d="M10.5 3.75a6.75 6.75 0 1 1 0 13.5 6.75 6.75 0 0 1 0-13.5Z" fill="#171717" id="Vector_12"/>
<path d="M15.6 15.6 20.25 20.25" stroke="#171717" stroke-width="1.75" stroke-linecap="round" id="Vector_13"/>
<image width="18" height="18" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUg..." />
</g>
<defs>
<clipPath id="clip0_12_88"><rect width="24" height="24" fill="white"/></clipPath>
</defs>
</svg>
Four clues sit in ten lines. Width and height say 288 while the viewBox says 24, so the file was exported at 12x. A clipPath wraps artwork that never leaves the viewBox. The string base64 means a bitmap is buried inside. And the stroke on Vector_13 is an instruction to draw, not a shape.
Setting one: the id attribute, which should stay off
Leave the id checkbox unchecked. Turned on, every node carries id="Vector_12" or id="Frame 4273". The cost lands later: inline two of those icons on one page and duplicate ids make an internal reference like url(#paint0_linear) resolve to whichever copy the browser met first. Your gradient icon goes flat on the third card of a grid, with no error.
Setting two: outline stroke, which decides whether small sizes survive
A stroke is a line drawn along a path, and stroke-width is measured in the same user units as the viewBox. A 1.75 unit stroke inside a 24 unit box is 7% of the icon width. Draw it at 20px on a 1x screen and the stroke is 1.45 device pixels, which the browser anti-aliases into a soft grey edge. That is the mush people call blurry.
Outline stroke keeps the result and discards the instruction. Figma converts the stroke to filled area, so shape plus stroke become one path with thickness baked in as geometry. Caps, miters, and dashes travel inside the shape instead of depending on each renderer to agree. Expect 30 to 60% growth on stroke-heavy icons. Pay it for anything below 32px.
Simplify stroke stays on. It can straighten a wobbly hand-drawn line, so check illustration by eye. Our rule: outline strokes on icons and logos, keep them live on work you might still tune.
Setting three: outline text, a size decision dressed as quality
Text kept as text exports with a font-family, weight, and size. Small, selectable, and dependent on that font existing where the file is drawn. Fine when the page loads Inter and the file asks for Inter. Not fine in an email client that never heard of your typeface – fallback metrics, shifted letters, a wordmark clipped at the right edge.
Outline text turns each glyph into a path. A four-letter wordmark gains roughly 6 to 18KB; a display headline gains much more, because tight curves are expensive to describe in points. You lose selectable text and, unless you add a title element, most of what a screen reader could announce. Outline the logo, keep UI text as text.
The two habits that cause the rest of the damage
First, exporting the frame instead of the object. Select the vector itself, or drag the export bounds onto the artwork, and half the groups and clips vanish before you touch a setting. Five nested frames holding single children export as five nested groups, faithfully. Tidying layers pays better than any optimizer – our guide to auto layout in Figma covers the nesting side.
Second, judging the result in the browser where you designed it. Chrome at 1440px with every font loaded makes any export look correct. Test at 20px inside the real interface.
One checklist per file type
| File | Settings | Pass condition |
|---|---|---|
| Logo or wordmark | Outline text on, outline stroke on, ids off | No text elements, no stroke attributes |
| Icon under 32px | Outline stroke on, ids off, export the vector only | Under eight paths, no base64, total under 2KB |
| Illustration | Outline text on, outline stroke off, ids off | No embedded raster, paths near layer count |
A clean 24px icon is often 600 bytes; exported from its parent frame it can be 4KB and soft.
Verify by reading the file, not by looking at it
SVG is text, which makes every export checkable in a minute with no plugins. Open it in a code editor, or use the Show code tab in Figma’s export panel.
- viewBox holds four numbers: minimum x, minimum y, width, height. The drawing area, not the display size. No viewBox means the file cannot scale at all.
- Path count is the fastest signal. A search icon belongs between one and four. Forty paths named Vector_3 to Vector_42 means a group explosion, usually a traced logo.
- base64 should return nothing on an icon. Every hit is a bitmap in a vector costume, and that is where the two-megabyte file came from.
- clipPath at small sizes is waste. One on a complex illustration is fine, three on a 24px icon is not.
- text means a font dependency. Ship the font or outline it.
The command you will reach for is grep -o "<path" icon.svg | wc -l, before and after. A count that barely moves means the weight sits elsewhere – a raster, or absurd precision.
The cleanup pass that takes thirty seconds
Figma output is not minified: comments, editor metadata, unused definitions, and decimal precision all ship. Run it through SVGO with the default preset and multipass, set precision 2, strip the data-name attributes Figma leaves on shapes. Never enable removeViewBox, which deletes the attribute that makes scaling possible.
From a batch we cleaned last month, 41 icons across three client files: mean 12.4KB in, 5.1KB out, no visible change at 24px or 400px. The worst went 34KB to 1.9KB, nearly all of it a base64 image nobody remembered placing. Minifiers preserve what you hand them. Plugin order is in our SVG optimization guide, including when automatic path merging breaks a fill.
Our editor, and where it stops
We built an SVG editor for exactly this mess. Drop in the exported file or paste the markup from Figma’s code panel, then move, scale, and rotate shapes, recolour fills and strokes, hide or lock layers, and export a cleaned, minified SVG.
The limit, plainly: it cannot edit individual path nodes. No bezier handles, no point editing, no booleans. If a letterform is wrong, fix it in Figma and re-export. It is a finishing tool for the last ten percent, not an Illustrator replacement.
Figma SVG questions we get most
Why is my SVG blurry?
Because it renders smaller than its geometry supports, or because it is not vector at all. If base64 appears anywhere, your icon is a bitmap in a vector wrapper and it blurs at every size. Otherwise look at hairline strokes and a missing viewBox.
Why is my SVG 2MB?
An embedded image fill, almost every time. A texture inside a shape gets pasted in as base64, roughly a third larger than the original bitmap. Search the text for base64. Outlined display text is the second cause, traced artwork the third.
Can I edit it after export?
Yes, more easily than people expect. It is XML, so a text editor can rename, delete a group, or change one fill. Our editor handles position, scale, rotation, and colour. Moving a single anchor point means going back to the source file.
The rest of the toolkit around this workflow – resizer, gradient builder, palette extractor – sits on the design tools page. Nothing you open leaves the browser.


Leave a Reply