Maskable icons

An installed web app's icon is often cut to a circle, a squircle or a rounded square. This guide covers the safe zone that survives every mask, which platforms apply one, what Chrome needs before it offers to install an app, and how much padding a mark needs.

What maskable means

A web app manifest lists the app’s icons, and each one can carry a purpose. The W3C Web Application Manifest defines three values:

One icon can list several values separated by spaces, and then “it could be used for any of those purposes”.

The safe zone is “a circle with center point in the center of the icon and with a radius of 2/5 (40%) of the icon size”. The spec then sets the rule a designer relies on: “The user agent MUST NOT make any pixel within the safe zone transparent.” Anything outside the circle may be cut away, and the browser composites an icon with transparent pixels “onto a solid fill (e.g., white) of the user agent’s choice”. So a maskable icon should be opaque to its edges, with everything that matters inside the circle.

Who applies a mask

Chrome reads purpose when it installs an app, and what happens next depends on the platform:

Outputs has the full table, with the file favseed writes for each platform.

What Chrome needs to offer an install

web.dev’s install criteria say the manifest’s icons “must include a 192px and a 512px icon”, and MDN asks the same of Chromium-based browsers. Chromium’s own check is looser on size and strict on purpose: it looks for a square icon of at least 144 px whose purpose includes any (installable_evaluator.cc). An icon declared maskable alone does not count, so a manifest whose icons are all maskable fails that check.

These criteria decide when Chrome offers the install, not whether it can happen. In Chrome, web.dev says, an app must meet them “before it will fire the beforeinstallprompt event and show the in-browser install promotion”, and it adds: “Users can install your web app even if it doesn’t meet the PWA installability criteria” (install criteria).

So ship a 192 and a 512 px icon, and declare at least one of them any.

One file or two

There are two ways to cover both purposes. The first is two files per size: a full-bleed any icon and a padded, opaque maskable one. That is what web.dev recommends: “We don’t recommend using multiple purposes for maskable icons. Using maskable icons as any icons adds unnecessary padding, making the core icon content smaller.” The second is one file declared any maskable, which the spec allows.

favseed takes the second route by default. icon-192.png and icon-512.png are padded into the safe zone on an opaque --bg ground and declared any maskable, so the same two files pass Chrome’s any check and survive every mask, with one render and one manifest entry per size. The cost is the one web.dev describes: on Windows and Linux, where Chrome draws the icon as it is, the app shows a smaller mark on its ground rather than edge to edge. Decision 22 records why.

To opt out, build with --bg none. The numbered icons are then transparent, unpadded and declared any only, and you can add maskable entries of your own to the manifest. apple-touch-icon.png is still placed in the safe zone either way.

How much padding

The W3C spec gives a rule of thumb in its notes on masks: “By staying inside the safe zone, most icons will have around 10% padding on the top, bottom, right and left”. That holds for a round mark, which can fill the whole circle: 80% of the width, 10% per side. It does not hold for every shape. A square mark reaches the circle with its corners, so it can be only 56.6% of the width, 21.7% padding per side. At 10% its corners fall outside the safe zone, where a circular mask cuts them off.

favseed’s --padding auto, the default, measures each mark instead of applying one number. It renders the mark at each icon’s own size, finds the opaque pixel farthest from the centre, and scales the mark until that pixel’s outer corner sits on the safe circle. Across favseed’s test fixtures it chooses between 7.6% and 18.8% per side. A mark drawn on a grid is then snapped to whole pixels: on a seven-block grid mark at 512 px, the partly covered edge pixels drop from 1,905 to none. How it works describes each step, and --padding takes a fixed percentage if you would rather choose.

That padding follows the spec, and an installed app honours it. Not every home-screen icon does. When Chrome does not install an app as a WebAPK, it adds a home-screen shortcut instead, and so do other Chromium browsers such as Brave and Vanadium. On a Pixel 9 Pro running GrapheneOS on Android 17, Chrome 158’s WebAPKs showed about 45% of the icon’s size from the centre, more than the spec’s 40%, but shortcuts from all three browsers showed only about 36% and cut the corners of a square mark placed by auto. A mark whose corners sit at 34.8% just fitted a shortcut; at 29.6% it had room to spare on both. If your mark is square and your visitors may add it as a shortcut, give it more room: this site’s own icons use --padding 26 for that reason. Decision 32 has the measurements.

Check your icons

Look at an icon through the masks before you ship it. Maskable.app previews it under a circle, a squircle, a rounded rectangle and other shapes, and can show only the minimum safe area. In Chrome, the Manifest section of DevTools’ Application panel lists the app’s icons; tick Show only the minimum safe area for maskable icons to trim each one to the safe circle. If the whole mark is still visible, no mask will cut it. The same tab shows an Installability section when an error blocks installation.

To make a padded, opaque set from your SVG, open the generator. It runs in your browser and builds the manifest icons, the apple-touch-icon and the favicons as one download.