How to Invert a Layer Mask in GIMP

By Henrick August 06, 2026 3 min read Layers, Selections & Masks

Inverting a layer mask swaps everything that is hidden with everything that is visible. If your mask hides the background and shows the subject, inverting it hides the subject and shows the background instead. It is a two-second operation that saves a lot of repainting time when you realize your mask is the wrong way around.

How to Invert a Layer Mask

  1. In the Layers panel, click the mask thumbnail (the second thumbnail to the right of the layer thumbnail) to make it active. You will see a white border appear around the mask thumbnail.
  2. Go to Colors > Invert (or press Shift+Ctrl+I in GIMP 3.x, or just Ctrl+I in some versions).

Every black pixel in the mask becomes white and every white pixel becomes black. Any gray areas invert proportionally - 80% black becomes 80% white. The layer visibility flips instantly on the canvas.

Common mistake: If you apply Colors > Invert without clicking the mask thumbnail first, GIMP will invert the layer pixels themselves instead of the mask. Always confirm you have the mask (not the layer) selected before inverting. The mask thumbnail has a white border when active; the layer thumbnail has one when the layer is active.

Why You Would Invert a Mask

The most common scenario: you created a white mask (fully visible) and painted black to hide the background. Then you realize it would have been faster to start with a black mask and paint white to reveal the subject. Inverting swaps all your work instantly.

Other practical cases:

  • Converting a background selection to a subject mask: You used Fuzzy Select on the background, converted it to a mask (which hides the background), but want the mask set up so the subject is hidden instead - Invert.
  • Effect reversal: You applied a texture or gradient effect through a mask and want to try the opposite - what was visible becomes hidden and vice versa.
  • Vignette adjustment: A darkening vignette that affects the center can be inverted to affect the edges instead.

Inverting is also part of the background removal workflow covered in the invert selection guide. The two operations are related but work on different things: inverting a selection flips the active selection boundary; inverting a mask flips the painted mask data.

Starting a Mask Already Inverted

When you create a layer mask via Layer > Mask > Add Layer Mask, the dialog lets you choose the starting state:

  • White (full opacity): Layer fully visible - You paint black to hide.
  • Black (full transparency): Layer fully hidden - You paint white to reveal.
  • Selection to mask: Creates the mask from the current active selection - White where selected, black elsewhere.
  • Invert mask checkbox in the dialog: Creates the mask from the selection but inverted - Black where selected, white elsewhere.

Using the correct initial state from the start is faster than creating the wrong one and inverting after. But when you are mid-project and the mask is complex, inverting afterward is the right tool.

Inverting Only Part of a Mask

To invert just a specific region of the mask (not the whole thing):

  1. Click the mask thumbnail to make it active.
  2. Make a selection over the area of the mask you want to invert.
  3. Apply Colors > Invert.
  4. Deselect with Ctrl+Shift+A.

Only the masked pixels within the selection get inverted. The rest of the mask stays unchanged. This technique is useful for fixing a small area of a large mask without repainting the whole thing.

Quick Recap

  • Click the mask thumbnail (white border = mask is active, not the layer)
  • Colors > Invert to flip the whole mask
  • Make a selection first to invert only part of the mask
  • Choose the right initial mask state (white vs black) when creating to minimize inversion needs
Tags: Gimp layers Layer Masks

Share this article:

Twitter / X Facebook

Related Articles