Figma SVG export problems usually show up at the worst moment: the icon looked perfect in Figma, but the exported file is blank in the browser, the gradient vanished, the text changed, the artwork is clipped, or React throws warnings about SVG attributes.
Use this fast rule before changing random markup:
If a Figma SVG export is not working, first verify the selection and viewBox, then check referenced defs, then test colors and dimensions in the real rendering context. Most broken exports come from those four areas, not from the path data itself.

Why does a Figma SVG export break after it leaves Figma?
A Figma SVG export breaks when the exported markup no longer has the same assumptions as the Figma canvas. Browsers need explicit SVG structure: a correct namespace, a usable viewBox, valid references to gradients or masks, predictable dimensions, and fonts or outlined paths for text. Figma can preview all of that inside its own editor, but your website cannot guess the missing pieces.
A Figma SVG export is browser-ready only when the selected object, viewport, definitions, text strategy, and CSS context all match the way the SVG will be used.
Start with this quick diagnosis:
| Symptom | Most Likely Cause | First Fix |
|---|---|---|
| Blank SVG | Missing dimensions, invisible fill, missing namespace, or broken file path | Open the SVG directly, then inspect width, height, viewBox, and fills |
| Cropped artwork | Wrong frame, bounding box, mask, or clipPath | Re-export a tighter frame and keep the original viewBox |
| Gradient missing | Removed defs, renamed IDs, duplicate IDs, or CSS collision | Preserve referenced IDs and test after optimization |
| Text changed | Font unavailable outside Figma | Outline logo text or load the font in your page |
| Too much whitespace | Exported parent frame instead of the actual object | Select the object or icon frame, not the whole page |
| React warnings | SVG attributes are still XML-style | Convert attributes like clip-path to clipPath |
If your SVG works as a standalone file but fails in the page, the problem is usually CSS, build tooling, React conversion, or duplicate IDs. If it fails as a standalone file, the problem is inside the SVG export itself.
How do I fix a Figma SVG that is blank or invisible?
Fix a blank Figma SVG by opening the file directly in a browser, confirming the file loads, then checking xmlns, viewBox, width, height, fill, stroke, opacity, and CSS overrides. A blank export is often rendering correctly but using white-on-white fills, zero dimensions, or artwork outside the visible coordinate system.
Work through this in order:
- Open the
.svgfile in a browser tab. - If the browser downloads the file instead of rendering it, check your server MIME type.
- Confirm the root tag includes
xmlns="http://www.w3.org/2000/svg". - Confirm the root tag has a
viewBox. - Add temporary dimensions such as
width="400" height="400"for debugging. - Search for
fill="none",opacity="0",display="none", and white fills on white backgrounds. - Paste the SVG into SVG Validator and fix markup errors before optimizing.
For example, this can disappear in an image tag:
<svg viewBox="0 0 24 24">
<path d="M4 12L10 18L20 6" stroke="white" fill="none"/>
</svg>
This is safer:
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24">
<path d="M4 12L10 18L20 6" stroke="currentColor" stroke-width="2" fill="none"/>
</svg>
If the graphic was supposed to come from a PNG, JPG, or screenshot rather than a native vector design, Figma export is the wrong repair path. Convert the source through Image to SVG or PNG to SVG, then clean the vector.
Why is my Figma SVG cropped after export?
A cropped Figma SVG usually means the exported frame, viewBox, mask, or clip path is smaller than the visible artwork. Figma can show overflow, effects, and shadows around a frame, but the exported SVG may use the frame bounds as the viewport. The browser then clips anything outside that coordinate box.
Use this decision rule:
| What You See | What To Do |
|---|---|
| Icon edges are cut off | Add padding inside the icon frame or select a larger frame before export |
| Shadow or blur is cut off | Expand the frame bounds or reduce the effect before export |
| Part of the object disappears only after cleanup | Restore the removed clipPath, mask, filter, or defs reference |
| SVG has huge empty space | Export the object frame, not the parent page frame |
| Artwork appears off-center | Check whether the viewBox includes negative coordinates or a translated group |
Do not delete the viewBox to fix clipping. The viewBox is the coordinate system that lets the SVG scale correctly. Instead, compare the selected Figma frame to the exported root tag:
<svg width="120" height="80" viewBox="0 0 120 80">
If the artwork actually extends beyond 0 0 120 80, re-export the asset with the correct frame bounds. If you must edit the file directly, use SVG Editor so you can see the result instead of guessing at coordinates.
Why did gradients, masks, or shadows disappear from my Figma SVG?
Gradients, masks, clip paths, and shadows disappear when the SVG loses the definitions they reference. Figma stores those effects in a defs block and connects them with IDs. If an optimizer deletes the block, renames IDs incorrectly, or creates duplicates, the browser cannot resolve the effect.
This pattern is fragile:
<path fill="url(#paint0_linear_122_9)" d="..." />
<defs>
<linearGradient id="paint0_linear_122_9">
<stop stop-color="#4F46E5"/>
<stop offset="1" stop-color="#22C55E"/>
</linearGradient>
</defs>
The path and the linearGradient must keep matching IDs. The same rule applies to:
fill="url(#...)"stroke="url(#...)"clip-path="url(#...)"mask="url(#...)"filter="url(#...)"<use href="#...">
When running SVG Optimizer or SVG Minify, use conservative settings first. Keep viewBox, keep active IDs, and avoid aggressive cleanup until you have compared before and after previews.
The SVG specification defines referenced paint servers such as gradients and patterns as elements that other SVG elements point to by URL references. MDN's SVG docs are a good reference when checking how defs, gradients, masks, and viewBox behave in browsers.
Useful references:
Should I outline text when exporting SVG from Figma?
Outline text when a logo, badge, or static illustration must look exactly the same on every device. Keep text as text when users, screen readers, translators, search engines, or your CMS need the words to remain real text. The wrong choice can make the export look broken even when the SVG syntax is valid.
Use this simple rule:
| Use Case | Export Text As | Why |
|---|---|---|
| Logo lockup | Outlined paths | Prevents font substitution |
| App icon | Outlined paths | Keeps the mark visually fixed |
| Infographic labels | Real text or HTML text nearby | Better accessibility and localization |
| Editable illustration | Real text | Easier future edits |
| Decorative headline art | Outlined paths | Consistent rendering |
If a Figma SVG looks different in the browser because the font changed, you have three options:
- Outline the text in Figma and re-export.
- Load the exact font in your website.
- Replace text inside the SVG with normal HTML text layered near the graphic.
For brand assets, outlining text is usually the least risky. For content graphics, real text is better when accessibility matters.
How do I make a Figma SVG work in React or Next.js?
To use a Figma SVG in React or Next.js, convert XML-style attributes to JSX attributes, preserve the viewBox, make color and size controllable, and avoid duplicate IDs when multiple copies render on one page. Simple static SVGs can stay in /public; reusable icons usually work better as components.
React expects:
<svg viewBox="0 0 24 24" className={className} aria-hidden="true">
<path
d="M4 12L10 18L20 6"
stroke="currentColor"
strokeWidth={2}
strokeLinecap="round"
strokeLinejoin="round"
/>
</svg>
Not:
<path stroke-width="2" stroke-linecap="round" clip-path="url(#clip0)" />
Common conversions:
| SVG Attribute | JSX Attribute |
|---|---|
stroke-width | strokeWidth |
stroke-linecap | strokeLinecap |
stroke-linejoin | strokeLinejoin |
clip-path | clipPath |
fill-rule | fillRule |
class | className |
If a gradient icon renders once but breaks when repeated in a list, check duplicate IDs. Figma-generated IDs like paint0_linear_1_5 can collide when the same component appears multiple times. Rename IDs to something stable and unique, or use your build tooling to prefix SVG IDs.
For a deeper cleanup workflow, read Figma SVG Export Clean Code Guide after this troubleshooting pass.
What is the safest Figma SVG export workflow?
The safest workflow is to export the smallest correct selection from Figma, test the raw SVG, validate it, clean it conservatively, then test the final file in the exact place it will render. Do not optimize first and debug later; that makes it harder to know whether Figma or the optimizer caused the break.
Follow this checklist:
- In Figma, select the icon frame, logo group, or illustration frame that should become the SVG.
- Export SVG at 1x.
- Keep the
viewBox. - Decide whether text should remain text or become paths.
- Keep IDs only when they are needed for gradients, masks, clip paths, filters, CSS, animation, or scripting.
- Open the raw SVG directly in a browser.
- Run it through SVG Validator.
- Clean it with SVG Optimizer using conservative settings.
- Compare raw and optimized previews.
- Test the final SVG in your actual website, app, CMS, email builder, or no-code tool.
If you need to edit path geometry after export, use Edit SVG Paths Online. If the issue is file size, use the safer strategy in SVG Compression Guide rather than deleting unknown markup by hand.
When should I use SVG Genie instead of re-exporting from Figma?
Use Figma again when the exported frame, layer selection, text outlining, or design bounds are wrong. Use SVG Genie when the export is basically correct but needs validation, markup cleanup, path editing, optimization, or conversion from a raster source. Re-exporting fixes design-source mistakes; SVG Genie fixes SVG-file problems.
Here is the practical split:
| Problem | Best Next Step |
|---|---|
| Wrong object exported | Re-export from Figma |
| Text needs outlining | Re-export from Figma |
viewBox is missing but artwork is intact | Inspect and repair in SVG Genie |
| Paths are jagged or too complex | Use SVG Editor or SVG Optimizer |
| File is too large | Use SVG Minify |
| PNG logo needs vector conversion | Use PNG to SVG |
| Browser says the SVG has markup errors | Use SVG Validator |
The easiest path is usually:
- Re-export the tight asset from Figma.
- Validate the raw SVG.
- Clean only what is safe.
- Test before replacing the production asset.
That gives you a Figma SVG that still looks like the design, loads like a real web asset, and does not create hidden problems in React, CMS previews, browser rendering, or optimization.
FAQ
Why is my Figma SVG export not working in a browser?
A Figma SVG export usually breaks because the wrong frame was exported, the viewBox does not match the artwork, a referenced gradient or clipPath ID was removed, text depends on a missing font, or CSS overrides fills, strokes, dimensions, or display rules.
How do I fix a Figma SVG that is clipped after export?
Re-export the tightest correct frame from Figma, keep the viewBox, remove unnecessary clipping only after visual testing, and check whether a parent frame, mask, or clipPath is intentionally cutting the artwork.
Why do Figma SVG gradients disappear after optimization?
Gradients disappear when an optimizer removes or renames IDs used by fill, stroke, mask, clip-path, or filter references. Preserve the defs block and any referenced IDs, especially when combining multiple SVGs on one page.
Should I export text from Figma as text or outlines?
Keep text as text when it needs to remain selectable, accessible, translatable, or editable. Outline text when the visual shape must look identical everywhere, such as a logo lockup or static decorative headline.
Can SVG Genie fix Figma SVG files?
Yes. Use SVG Genie's editor, validator, minifier, and optimizer to inspect the exported markup, preserve the viewBox and required definitions, remove safe clutter, and test the cleaned SVG before shipping it.
Create your own SVG graphics with AI
Describe what you need, get a production-ready vector in seconds. No design skills required.
About This Article
This article was written by SVG Genie Team based on hands-on testing with SVG Genie's tools and years of experience in vector design and web graphics. All recommendations reflect real-world usage and are reviewed by the SVG Genie editorial team for accuracy.
About the Author
SVG Genie Team
SVG Design Expert & Technical Writer at SVG Genie
SVG Genie Team is a vector design specialist and technical writer at SVG Genie with years of hands-on experience in SVG tooling, AI-assisted design workflows, and web graphics optimization. Their work focuses on making professional vector design accessible to everyone.
More articles by SVG Genie Teamarrow_forward