CSS Mask Generator
Generate CSS mask-image rules with gradient presets — create fade and reveal effects.
.masked {
mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
-webkit-mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
}Preview
Masked content
CSS mask-image explained
The mask-imageCSS property uses a gradient (or image) as an alpha mask. Pixels where the mask is black are fully visible; pixels where it's transparent are hidden. Gradients from black to transparent create smooth fade effects. Always include the -webkit-mask-image prefix for Safari compatibility.
For clip-path shapes, use the CSS Clip-Path Generator. For box shadow, try Box Shadow Generator. For CSS gradients, see Gradient Generator.
Private & free — this tool runs entirely in your browser.
Recommended: Kinsta — Fast managed hosting — up to $500 + 10% recurring.affiliate
Related Design & CSS tools
Color Converter
Convert a color to HEX, RGB, HSL, HSB, and CMYK at once.
HEX to RGB
Convert HEX color codes to RGB / RGBA values.
RGB to HEX
Convert RGB values into HEX color codes.
CSS Box Shadow Generator
Visually design CSS box-shadow with a live preview and code.
CSS Border Radius Generator
Visually craft border-radius with a live preview.
HEX to CMYK
Convert HEX colors to CMYK print values.
CMYK to HEX
Convert CMYK print values to HEX colors.
HEX to HSB
Convert HEX colors to HSB / HSV values.