All articles

Window gaps on Mac: how to set the space between tiled windows

Almost nobody outside the tiling-window-manager crowd talks about window gaps on a Mac — the few pixels of empty space between two tiled windows. It sounds like the least important setting on the machine. Then you spend a day with windows edge to edge, notice you keep misreading where one app stops and the next begins, and realise the gap was doing work. Here is what macOS gives you, how to remove it if you hate it, and how to set a size you actually chose.

What macOS's own window gap actually is

macOS's built-in tiling puts a margin around every tiled window. The control is a single switch:

System Settings → Desktop & Dock → Windows → Tiled windows have margins.

On a fresh install it's on. Two things about it are worth knowing:

  • It's a toggle, not a size. You get Apple's margin or no margin. There's no slider, no number, no per-display value.
  • It only applies to macOS's own tiling. Windows you place by hand, or with a third-party tiler, are unaffected — those tools bring their own gap behaviour.

That's the whole native story. Which is why the question "how do I make the gap bigger?" has no native answer at all.

Why keep a gap at all

The honest version: gaps are a readability trick, and they cost screen space.

Two windows flush against each other share an edge, and your eye has to do the work of deciding which pixels belong to which app — especially between two windows of the same app, or two light-themed apps, where the seam is a one-pixel border on a nearly identical background. A few pixels of desktop between them turns an ambiguous seam into an obvious boundary. The same reason paragraphs have spacing.

Gaps also make the edges clickable again. With a flush layout, the strip of desktop you'd drag or right-click is gone, and dragging a window's edge to resize means hitting a boundary shared with its neighbour.

Against that: every pixel of gap is a pixel not showing content. On a 13-inch MacBook running two windows side by side, an 8-pixel gap is real estate you'd rather have — see our notes on window management on a small screen. On a 27-inch display or an ultrawide, it costs you nothing you'll notice.

The reasonable rule: gap size should scale with screen size, and zero is a legitimate choice on a laptop.

How to turn Mac window gaps off

If you're here because macOS started leaving space you didn't ask for, switch off Tiled windows have margins in Desktop & Dock and tiled windows go flush. If the built-in tiling is annoying you in other ways too — snapping when you drag near an edge, filling the screen when you touch the menu bar — we cover the whole set of switches in how to disable window tiling on a Mac.

How to choose your own gap size

Every serious window tool has an opinion about gaps. Here's what each one actually lets you set:

ToolGap controlPer displayNotes
macOS built-in tilingOn/off onlyNoTiled windows have margins, Desktop & Dock → Windows
Let's TileMargins between cells, in pixels (Pro)Grid is per displaySet once, applies to every snap
Rectangle"Gaps between windows" in preferences, plus screen-edge gaps via defaultsMain-screen-only option for edge gapsFree and open source
MagnetNo gap setting exposedNoTiles land flush
yabaiwindow_gap plus four padding valuesPer spaceNeeds a scripting setup, and SIP work for some features
AeroSpace[gaps] in config.toml, inner and outerYesTOML config, no SIP changes

For the scriptable managers the syntax is short. yabai:

yabai -m config window_gap 8
yabai -m config top_padding 8
yabai -m config --space 2 window_gap 0

AeroSpace, in ~/.config/aerospace/config.toml:

[gaps]
inner.horizontal = 10
inner.vertical = 10
outer.left = 10
outer.right = 10

Both are excellent and both ask you to maintain a config file. If that's the trade you want, we compared them in yabai vs AeroSpace.

Rectangle is the middle ground: a gap value in its preferences, and edge gaps for people running a dock replacement or a menu-bar tool that needs reserved space, set from Terminal — defaults write com.knollsoft.Rectangle screenEdgeGapTop -int 10. There's a separate screenEdgeGapTopNotch key, because a MacBook's notch wants a different number from an external display.

Where Let's Tile lands

Let's Tile is a keyboard tiler built on one shortcut rather than twenty: press ⌘↵, a grid drops over the window you were using, you steer with the arrow keys and hit return. Nothing to memorise. The free tier is a 3 × 2 grid — halves, thirds, two-thirds, quarters, full screen — and it's yours forever.

Gaps live in Pro, as margins between cells in pixels, alongside custom grids, a remembered grid per display, and throwing a window to another display mid-tile. It's $9.99 once — no account, no subscription, no telemetry, up to 20 devices per key. Set a margin value once and every snap respects it, on whichever grid that display is using.

Being straight about it: Let's Tile is newer than Rectangle or Magnet, and it isn't open source. If open source is the requirement, Rectangle is the right answer and has a gap setting too. If you want a visible grid and a margin you set in pixels rather than a toggle, that's the case for ours.

What gap size should you use?

Rough numbers that hold up in practice:

  • 13–14-inch laptop: 0–4px. Content is scarcer than clarity.
  • 16-inch laptop or 24-inch display: 4–8px.
  • 27-inch or larger: 8–12px, and consider a matching outer padding so windows don't touch the screen edge either.
  • Ultrawide: 8–12px matters more here, because you'll be running three or four columns and every internal seam is a place to get lost. See tiling on an ultrawide.

Set it once, live with it for a week, adjust once. It is not a setting worth revisiting.

Frequently asked questions

Can I change the size of the macOS tiling margin? No. The built-in setting is on or off. Changing the size means using a third-party tiler that exposes a value.

Do gaps show the desktop wallpaper? Yes — the space between tiled windows is desktop, so whatever is behind your windows shows through. A busy wallpaper makes gaps louder; a plain one makes them read as neutral space.

Do gaps slow anything down? No. A gap is just a smaller frame for each window; there's no extra work being done.

Why do my windows have a gap even with margins turned off? Check whether a third-party window manager is doing the tiling rather than macOS — its own gap setting takes over. If nothing is running, see when tiling shortcuts stop working.