Skip to content

How to add a space between Dock icons on a Mac

There is no button for it, but one Terminal command adds a blank gap between Dock icons, so you can group apps. How to add one, move it and remove it.

Guide · Updated 16 October 2026

How do I add a space between apps in the Mac Dock?

Paste this into Terminal and press Return. The Dock restarts and a blank spacer appears at the end of your apps:

defaults write com.apple.dock persistent-apps -array-add '{"tile-type"="spacer-tile";}'; killall Dock

Run it again for each gap you want. For a half width gap, use small-spacer-tile in place of spacer-tile.

How do I move or remove a Dock spacer?

Drag it like an icon to move it. To remove it, drag it out of the Dock until Remove appears, or right click it and choose Remove from Dock.

Is it safe to change the Dock with Terminal?

Yes. The command adds one entry to the Dock's own list of icons, and killall Dock restarts the Dock, which macOS reopens straight away. Your apps and windows are not touched. If you ever want the Dock exactly as Apple ships it, defaults delete com.apple.dock; killall Dock resets it, which also removes every app you added.

Related: customise the Dock and add apps to the Dock.

Checked on 16 October 2026 on a MacBook Air (M1) running macOS 27.0.1, by reading the Dock's settings, the labels in System Settings and the keyboard shortcut list. Nothing was changed. The spacer commands were not run on this Mac; its Dock had no spacer tiles. They write the spacer-tile and small-spacer-tile entries the Dock reads.

Questions

How do I add a gap in the Mac Dock?

Run defaults write com.apple.dock persistent-apps -array-add '{"tile-type"="spacer-tile";}'; killall Dock in Terminal, then drag the spacer where you want it.

How do I remove a spacer from the Dock?

Drag it out of the Dock until Remove appears, or right click it and choose Remove from Dock.