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.
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 DockRun 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.
Read next
- Guide
How to add apps to the Dock on a Mac, and keep them there
Drag an app in, or keep one that is open. How to add apps, folders and websites to the Mac Dock, and why an app you added keeps disappearing.
Read › - Guide
How to turn off swiping between full screen apps on a Mac
Stop sideways swipes switching desktops by accident, or free the gesture for another app. Where the setting is, and what to use instead.
Read › - Guide
Where did Launchpad go on a Mac? How to open Apps, its replacement
Launchpad is gone from current macOS. On our Mac it was replaced by Apps, already in the Dock. How to open it, add it back, and find apps without it.
Read ›