ThisCalculator

Everyday

Add Spaces Dock Mac: How to Add Gaps to the macOS Dock

Updated · Standard formula, shown below

If you want to add spaces (gaps) between apps in the macOS Dock, the answer is a simple Terminal command that inserts invisible spacer icons. This article explains the exact commands, how to remove the spaces, and what to do if the trick stops working after a macOS update.

Why Add Spaces to the Dock?

The Dock is a central part of macOS, holding your most-used apps, folders, and minimized windows. By default, apps sit next to each other with no separation, which can make it hard to visually group related apps (e.g., all your browsers together, or your design tools). Adding spaces creates visual breaks, helping you organize the Dock by function or priority without needing folders or extra tools.

This is a purely cosmetic change. It does not affect how apps launch, how the Dock behaves, or any system settings. The spaces are actually invisible “spacer” icons that occupy a fixed amount of space, just like a regular icon would.

How to Add Spaces Using Terminal

The only built-in way to add spaces is through the defaults command in Terminal. Here are the exact steps:

  1. Open Terminal (found in Applications > Utilities).
  2. Copy and paste one of the following commands, then press Return:
  • Small space: defaults write com.apple.dock persistent-apps -array-add '{"tile-type"="small-spacer-tile";}'
  • Large space: defaults write com.apple.dock persistent-apps -array-add '{"tile-type"="spacer-tile";}'
  • Flexible space (pushes everything after it to the right): defaults write com.apple.dock persistent-apps -array-add '{"tile-type"="flex-spacer-tile";}'

After running the command, restart the Dock with: killall Dock

The spacer appears at the end of the Dock. To move it, just drag it like any other icon. You can add as many as you want, in any combination.

How to Remove Spaces

Removing a spacer is as simple as removing an app icon:

  1. Click and hold the spacer (the empty area) until a menu appears.
  2. Choose Remove from Dock.

Alternatively, you can drag the spacer out of the Dock and release it – it will disappear with a puff of smoke. This works for all three types of spacers.

What If the Spacers Don’t Appear?

Sometimes the command runs without errors, but no spacer shows up. This usually happens because the Dock’s preferences are stored in a different location or are protected by System Integrity Protection (SIP) on newer macOS versions. Here’s what to try:

  • Check the command syntax: Make sure you copied the entire command, including the quotes and braces. A missing quote will cause a syntax error.
  • Run killall Dock: The Dock must be restarted for changes to take effect. If you don’t see the spacer immediately, run this command.
  • Use the full path: Some users report that adding ~/Library/Preferences/ before com.apple.dock helps, but this is rarely needed.
  • Try a different tile type: If the small spacer doesn’t work, try the large one. It’s possible you accidentally added a spacer to the wrong section (e.g., the Trash side).

If none of these work, your macOS version may have changed how the Dock stores its preferences. As of macOS Sonoma (14) and later, the command still works, but Apple may change this in the future. Always back up your Dock preferences before experimenting: defaults export com.apple.dock ~/Desktop/dock-backup.plist

Using Third-Party Apps

If you prefer a graphical interface, several free and paid apps can add spacers and other Dock customizations. These apps essentially do the same thing as the Terminal command, but with a user-friendly interface. Popular options include Dock Spacer and cDock (note: cDock is not updated for all macOS versions). Before using any third-party tool, check that it is compatible with your macOS version and read reviews from trusted sources. The Terminal method is always the safest because it uses Apple’s own settings system.

Common Mistakes and Misconceptions

One common mistake is thinking that the spacer will appear immediately. You must restart the Dock for changes to take effect. Another is confusing the spacer with the Dock’s built-in separator line (a thin vertical line that separates apps from the Trash and minimized windows). That separator cannot be moved or removed. Also, note that spacers added to the right side of the Dock (the section for minimized windows and the Trash) require a different command – the ones above only affect the left side (app icons).

A frequent misconception is that adding spaces will slow down the Dock or affect performance. It does not – the spacers are just empty icons, and the Dock handles them exactly like any other icon. The only thing to be aware of is that if you have many spacers, they take up space, so you might need to enlarge the Dock or reduce the number of apps.

Alternatives to Spacers

If you want visual separation without using Terminal, you can:

  • Use folders: Drag one app onto another to create a folder, then drag other apps into it. This groups apps but also changes how they launch.
  • Use the Dock’s magnification: Not a separator, but it can help visually distinguish icons.
  • Rearrange apps: Simply drag apps to group them by category – the Dock doesn’t force any order.

These alternatives are less flexible than spacers but require no commands.

Frequently Asked Questions

Will adding spaces affect my Dock’s performance?

No. Spacers are just empty icons. The Dock treats them like any other icon, so there is no performance impact. The only effect is visual.

Can I add a space between the app section and the Trash?

Yes, but you need to use a different command. The commands above add spacers to the left side (apps). To add a spacer to the right side (where minimized windows and the Trash are), use defaults write com.apple.dock persistent-others -array-add '{"tile-type"="spacer-tile";}' and then restart the Dock.

Why do my spacers disappear after a macOS update?

macOS updates sometimes reset the Dock to its default state. This is rare, but it can happen. You can simply re-run the commands after the update. To avoid losing your entire Dock layout, you can back up your Dock preferences with defaults export com.apple.dock ~/Desktop/dock-backup.plist and restore with defaults import com.apple.dock ~/Desktop/dock-backup.plist.

Is there a way to add spaces without Terminal?

Yes, third-party apps like Dock Spacer provide a graphical interface. However, they rely on the same underlying mechanism, so they may not work if Apple changes the system. The Terminal method is the most reliable and is built into macOS.

Can I make a spacer a specific width?

No. The small spacer is a fixed width, and the large spacer is a fixed width (about twice the small one). The flexible spacer expands to fill available space, pushing icons to the right. You cannot set a custom pixel width without using a third-party tool that modifies the Dock’s appearance more deeply.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.