SVG browser compatibility
What caniuse and MDN data show about SVG support across browsers, which old habits to drop, and how to test the cases that still bite.
SVG itself is old and well supported. The compatibility questions that remain are about specific features, how the SVG is embedded, and a few legacy habits. This guide reports only what I could confirm from the caniuse data and MDN pages on 21 November 2026, and says where the data stops.
What the data says about core support
The caniuse feature data lists the earliest browser version marked fully supported for each feature below. I read these values on 21 November 2026. The data runs up to Chrome 160, Firefox 163, Safari 27.3 (plus Technology Preview), Edge 156 and iOS Safari 27.2, and in every row below each browser is marked supported through its latest listed version.
| Feature | Chrome | Firefox | Safari | Edge | iOS Safari |
|---|---|---|---|---|---|
Basic SVG (SVG 1.1, object and embed) |
4 | 3 | 3.2 | 12 | 3.2 |
| Inline SVG in HTML5 | 7 | 4 | 5.1 | 12 | 5.0 to 5.1 |
SVG in <img> |
28 | 4 | 9 | 12 | 9.0 to 9.2 |
| SVG in CSS backgrounds | 5 | 24 | 5 | 16 | 4.2 to 4.3 |
| SVG filters | 8 | 3 | 6 | 12 | 6.0 to 6.1 |
| SMIL animation | 5 | 4 | 6 | 79 | 6.0 to 6.1 |
| Fragment identifiers | 50 | 15 | 11.1 | 12 | 11.3 to 11.4 |
Two things to read carefully. First, “earliest supported” does not mean “identical everywhere”. caniuse attaches footnotes to some entries. For inline SVG, a footnote on some older Safari, Edge and iOS Safari entries says CSS transforms on SVG elements are not supported there, and the transform attribute can be used instead. For fragment identifiers, the footnotes describe partial support in <img> but not CSS backgrounds, and the lack of external fragments. For SMIL, the footnote on older Safari says partial support meant SMIL did not work in HTML files or CSS background images.
Second, the table covers whether a feature exists, not whether two engines render it pixel for pixel. I did not verify rendering differences, so test your own artwork. Only your own testing will tell you.
What this means in practice
If your audience uses current browsers, you can use inline SVG, <img> with SVG files, CSS backgrounds, filters and SMIL without a fallback. I would not spend effort on the oldest versions in the table without evidence from your own analytics.
The more useful question is usually which feature of SVG you are relying on, and which of those have a record of problems. The sections below cover what I could verify.
Use href, not xlink:href
SVG 2 replaced xlink:href with plain href. MDN marks xlink:href as deprecated and says it may be removed in future. When both are present on <use>, MDN says href takes precedence, and on animation elements the latter attribute wins. For older browsers, the documented pattern is to keep both:
New work can use href alone. The playground above does. MDN also notes that browsers may apply the same-origin policy to <use> and may refuse a cross-origin URL in href, with no way to set a cross-origin policy for it. Loading via data URIs in <use> is deprecated for security reasons. If you reference an external sprite file, keep it on your own origin and test it in each browser you care about.
Know the status of newer and rarer features
MDN reports the following, and nothing more than this should be read into it:
<foreignObject>is marked Baseline “widely available”, available across browsers since July 2015. It lets you embed elements from another namespace, most likely HTML. I could not extract the per-browser notes from the MDN compatibility table, so I make no claim about quirks.vector-effectis marked Baseline “widely available”, since July 2020. MDN listsnone,non-scaling-stroke,non-scaling-size,non-rotationandfixed-position, and says the last three have no implementations and are considered at risk. In practice, use onlynon-scaling-stroke, and treat the rest as unavailable.- SMIL is in every browser listed in the table above. The MDN SMIL guide I read says nothing about its status, so I make no claim about deprecation either way.
Here is vector-effect="non-scaling-stroke" in action. Both groups are scaled, but the stroke on the second keeps its width:
Embedding context changes what works
Support for a feature can depend on how the SVG is loaded. The SVG 2 specification defines processing modes: an SVG in <img> runs in a secure mode with no scripts and no external resource loading, while SVG used as a document or inline inherits different rules. MDN’s page on SVG as an image says the same for scripts and external resources. The practical effects:
- An SVG in
<img>or a CSS background cannot load external stylesheets or images, unless they are inlined asdata:URLs. - Caniuse notes partial support in older browsers for data URI images inside SVG used in
<img>. - A script-driven interaction works only inline, or in an
<object>or<iframe>. The security guide explains why.
If a graphic behaves differently in two places, check how it is embedded before blaming the browser. Responsive SVG covers sizing differences across contexts.
A testing routine that fits SVG
- Decide which browsers and versions you support from your own analytics, not from a general feeling.
- Test each SVG in the contexts you use:
<img>, inline, CSS background and sprite. - Check the features that depend on the browser’s renderer: filters, masks, text, fonts and blend modes. SVG filters and masks and clipping explain what each does.
- Test in a real mobile Safari and a real desktop Firefox at least once. Emulators in developer tools are not a substitute for the real engine.
- Re-check the compatibility data when you rely on something new. The MDN tables and caniuse change as browsers ship.
What I could not verify
I did not check data for SVG fonts, context-fill and context-stroke, mix-blend-mode on SVG elements, or CSS properties applied to SVG such as d or transform-box. Those are worth looking up directly on MDN before you depend on them. Where this guide gives no claim, that is deliberate.
Sources
Checked against these references on 2026-11-21.
- caniuse data: SVG (basic support)
- caniuse data: Inline SVG in HTML5
- caniuse data: SVG in HTML img element
- caniuse data: SVG in CSS backgrounds
- caniuse data: SVG filters
- caniuse data: SVG SMIL animation
- caniuse data: SVG fragment identifiers
- MDN: SVG href attribute
- MDN: SVG use element
- MDN: SVG foreignObject element
- MDN: SVG vector-effect attribute
- MDN: SVG as an image
- MDN: SVG animation with SMIL
- W3C: SVG 2, conformance and processing modes