CSS Masks works in Chrome 120+, Edge 120+, Firefox 53+, Safari 15.4+, Opera 106+, and Samsung Internet 25+. See full browser support and known issues.

Prince Dewani
May 1, 2026
CSS Masks is a W3C feature from the CSS Masking Module Level 1 that hides part of an element using an image, gradient, or SVG mask. It works unprefixed in Chrome 120+, Edge 120+, Firefox 53+, Safari 15.4+, Opera 106+, and Samsung Internet 25+, while older builds need the -webkit- prefix and Internet Explorer never added support.
This guide covers what CSS Masks are, the browsers that support them, the mask properties, how to use them, and the known issues.
CSS Masks are a W3C feature from the CSS Masking Module Level 1 that hides part of an element through the alpha or luminance channel of a mask source. The mask shorthand and its longhands accept PNG images, SVG mask elements, and CSS gradients as that source.
Every modern desktop and mobile browser supports the unprefixed mask property, while older Chromium, Safari, and Samsung Internet builds need the -webkit-mask-image prefix and Internet Explorer never added support. Global coverage reaches roughly 96% when partial, prefixed support is counted.
Chrome supports the unprefixed mask property from Chrome 120 on Windows, macOS, Linux, ChromeOS, and Android. Chrome 4 through 119 supported masking only through the -webkit-mask-image prefix and a subset of mask longhands. Pair every mask declaration with -webkit-mask-image to cover the partial-support window.
Microsoft Edge supports the unprefixed mask property from Edge 120 on Windows, macOS, Linux, and Android. Chromium-based Edge 79 through 119 only accepted -webkit-mask-image, and the legacy EdgeHTML builds 12 through 18 had no support at all. Chromium Edge tracks Chrome exactly, so the same prefixed fallback applies.
Firefox supports the unprefixed mask property from Firefox 53 on Windows, macOS, Linux, and Android. Firefox 3.5 through 52 supported the older SVG-based mask spec only, accepting mask: url(#id) for inline SVG masks but not gradient or image sources. Firefox does not need the -webkit- prefix at any version.
Safari supports the unprefixed mask property from Safari 15.4 on macOS and Safari on iOS 15.4 on iPhone and iPad. Safari 4 through 15.3 and Safari on iOS 3.2 through 15.3 supported masking only through -webkit-mask-image, the original WebKit prefix that shipped before the W3C spec. Always pair the prefixed and unprefixed declarations for older Apple devices.
Opera supports the unprefixed mask property from Opera 106 on Windows, macOS, Linux, and Android. Opera 15 through 105, which switched to the Blink engine, accepted the -webkit-mask-image prefix only. Opera Mini, which renders pages on a remote server, has no mask support at any version and falls back to the unmasked element.
Samsung Internet supports the unprefixed mask property from Samsung Internet 25 on Galaxy phones and tablets. Samsung Internet 4 through 24 only accepted -webkit-mask-image because those builds tracked an older Chromium baseline. Every release from version 25 forward inherits Chrome on Android behavior.
The legacy Android Browser shipped on Android 2.1 through 4.4.4 supported masking only through -webkit-mask-image. Modern Android Browser builds running on Chromium 120 and later inherit the unprefixed mask property from the system WebView. Apps that embed Android WebView pick up unprefixed mask once the WebView updates past the Chromium 120 baseline.
Internet Explorer 5.5 through 11 do not support any of the CSS mask properties. The Trident engine never received the CSS Masking module and silently ignores the rule. Microsoft has retired Internet Explorer 11, so users on supported Windows builds run Microsoft Edge, which supports the unprefixed mask property from Edge 120 forward.
Note: CSS Masks render differently across older Blink, WebKit, and Samsung Internet builds. Test it on real browsers and OS with TestMu AI. Try TestMu AI free!
The mask shorthand rolls up eight longhand properties from the CSS Masking Module Level 1. Setting the shorthand resets every longhand it covers, so reach for the longhand when you only want to change one piece.
A separate mask-border shorthand and its longhands cover image-based border masks, but support for mask-border lags behind the main mask property and currently ships only in WebKit and Firefox.
Pick a mask source, point mask-image at it, and pair the unprefixed declaration with the -webkit-mask-image fallback. The steps below cover the common image, gradient, and SVG patterns in one pass.
/* Use a PNG or SVG image as the mask source. */
.image {
-webkit-mask-image: url(shape.svg);
mask-image: url(shape.svg);
-webkit-mask-size: contain;
mask-size: contain;
-webkit-mask-repeat: no-repeat;
mask-repeat: no-repeat;
}
/* Fade the bottom of an image with a CSS gradient. */
.fade {
-webkit-mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
}
/* Reference an inline SVG <mask> element by its id. */
.svg-mask {
-webkit-mask-image: url(#star);
mask-image: url(#star);
-webkit-mask-mode: alpha;
mask-mode: alpha;
}The three rules above cover image, gradient, and inline-SVG mask sources. Drop them into a stylesheet, attach the matching class to an element with visible content, and the mask appears on every browser that supports either the prefixed or unprefixed declaration.
CSS Masks have a few sharp edges that show up only when you ship to production across browsers. Plan around these before you replace static PNG cutouts with a mask rule.
All CSS Masks version numbers and platform notes in this guide come from these primary sources:
Did you find this page helpful?
More Related Hubs
TestMu AI forEnterprise
Get access to solutions built on Enterprise
grade security, privacy, & compliance