Mac menu bar spacing: how to tighten it, and what it fixes
Mac menu bar spacing cannot be changed in System Settings. On macOS 14, 15 and 26, it is controlled by two hidden system values, NSStatusItemSpacing and NSStatusItemSelectionPadding, which can be set with two Terminal commands and undone with two more. On macOS 27 that route no longer works, according to the developer of the free Menu Bar Spacing app, because Apple rewrote the menu bar and left those settings out. There, spacing can only be changed by a menu bar manager that implements it itself. In every case, only the icons on the right side are affected. The app menus on the left keep their normal gaps.
What follows is the method for each macOS version, what each value does, how to reverse it, and an honest estimate of what tighter spacing gains you.
Why spacing matters more on some Macs than others
On a large external display, the gaps between menu bar icons are a matter of taste. On a MacBook with a camera notch in the middle of the screen, they decide which icons you can see at all.
The right side of the bar fills from the clock leftward. When it runs out of room before reaching the notch, macOS does not shrink the icons or move them to a second row. Icons that do not fit are simply not shown. Bartender's product page describes automatically hiding items the notch would cover, which is a sign of how common the problem is. There is no warning when it happens, so an icon can be missing for weeks before anyone notices.
The left side makes it worse. App menus take the space they need, and an app with many menus, such as a photo editor or a code editor, pushes the boundary further right. The same set of status icons can fit fine with Safari in front and partly vanish with a larger app in front.
Tighter spacing is the one fix that keeps every icon visible without hiding any. It does not create space from nothing, but with fifteen or twenty icons the gaps add up to the width of several icons.
The Terminal method on macOS 14, 15 and 26
Two values control the layout. NSStatusItemSpacing is the gap between neighbouring icons. NSStatusItemSelectionPadding is the padding around an icon that shows when it is highlighted after a click. Changing only the spacing leaves the highlight wider than the gap, so the highlights of neighbouring icons overlap visually. Change both, and keep the padding no larger than the spacing.
Open Terminal from Applications, then Utilities, and run:
defaults -currentHost write -globalDomain NSStatusItemSpacing -int 8
defaults -currentHost write -globalDomain NSStatusItemSelectionPadding -int 6
The -currentHost flag stores the setting for this Mac only, so it has to be repeated on each Mac where you want it.
The change does not take effect until the processes that draw menu bar items restart. The reliable way is to log out and log back in. Apple items redraw with the new spacing, and third party icons redraw as each app restarts. The Menu Bar Spacing product page warns that because of a macOS 26 bug, third party menu bar apps need to be relaunched before they show the correct spacing, so on Tahoe expect to quit and reopen a few apps even after logging in again.
Choosing values
Lower numbers mean tighter spacing. Start with 8 and 6, look at the bar for a day, and adjust by two at a time. Very low values, around 2 or below, make icons nearly touch, and the click targets become hard to hit with a trackpad. There is no officially documented range, because these are undocumented settings, so treat any value as an experiment.
Undoing it
To return to the macOS default, delete both values and log out:
defaults -currentHost delete -globalDomain NSStatusItemSpacing
defaults -currentHost delete -globalDomain NSStatusItemSelectionPadding
Deleting rather than writing a "default" number is the safer reversal, because it removes the override entirely instead of guessing what Apple's value was.
Checking what is set, and fixing a bar that looks wrong
Before changing anything, it helps to know whether a previous experiment already left a value behind. Many people tried these commands years ago, forgot, and later wonder why their bar looks different from a colleague's. To read the current values, run each of these in Terminal:
defaults -currentHost read -globalDomain NSStatusItemSpacing
defaults -currentHost read -globalDomain NSStatusItemSelectionPadding
A number means an override is in place. A message saying the domain or default pair does not exist means the Mac is using Apple's default, and nothing has been changed.
Measuring the gain
To see whether a change is worth keeping, take a screenshot of the right side of the bar before and after. Press Shift, Command and 4, then drag across the bar from the clock to the leftmost icon. Comparing the two images shows exactly how many icons moved into view and how much empty width was recovered. This takes a minute and replaces guessing with a direct comparison.
When an icon disappears after the change
Sometimes an icon vanishes right after spacing is changed. That usually means its app has not yet redrawn, not that it was removed. The Menu Bar Spacing page notes that the app relaunches every menu bar item to apply a change, and that iStat Menus in particular can take a while to come back. Wait a minute, then quit and reopen the missing app from Applications. If several icons are still missing, logging out and in again redraws everything.
If the bar becomes hard to use, for example because icons are so close that clicks land on the wrong one, delete both values with the commands above and start again with a less aggressive number. There is no penalty for trying several values in a row, apart from the log out each time.
macOS 27 and the end of the hidden setting
The same Menu Bar Spacing page carries a warning for macOS 27: the app no longer works there, because Apple rewrote the menu bar and did not include the hidden settings needed to adjust spacing. The developer adds that there is nothing the app can do about it. The commands above can still be typed on macOS 27 without an error, since defaults will write any value you give it, but the bar ignores them.
That changes the options on the newest release. Spacing is still possible, but only through tools that lay out the icons themselves rather than relying on the system setting. Bartender's site, checked on October 18, 2026, advertises Bartender 7 as built for macOS 27 and includes a spacing control with presets labelled Default, Small and Tiny, with the page illustrating Small as fitting two more items and Tiny as fitting four more. That is the vendor's own illustration, and the real gain depends on how many icons are on the bar and how wide each is.
If the Mac is on macOS 27 and a spacing change is the goal, confirm that the tool you choose lists macOS 27 support explicitly before buying.
Apps that change spacing for you
Typing Terminal commands works, but several apps wrap the same idea or implement their own version. Here is what each vendor's page said on October 18, 2026.
| App | Spacing feature | Price | Notes |
|---|---|---|---|
| Menu Bar Spacing | Slider for the gap | Free | Requires macOS 26; older builds for 14 and 15; does not work on 27 |
| Bartender 7 | Default, Small, Tiny presets | Paid, 4 week trial | Built for macOS 27; Bartender 6 for macOS 26 |
| Ice | Menu bar item spacing, marked beta | Free, open source | macOS 14 and later |
| Barbee | Reduce Spacing | Free with paid VIP features | 3 day trial of VIP |
Menu Bar Spacing is the narrowest of these and also the most transparent about how it works. Its page explains that it only needs to run once, that the setting persists after the app is deleted, that it cannot change the left side of the bar, and that it applies globally with no per app or per display setting. It also notes that changing the value interrupts any ongoing screen recording or screen sharing, because it restarts some system processes to apply the change immediately. That is worth knowing before adjusting it during a call.
Sindre Sorhus also makes Spaced, a free App Store app that does the opposite job. It adds separators between groups of menu bar items, which suits large displays where there is room to spare and the problem is finding things, not fitting them.
What tightening fixes, and what it does not
Tighter spacing is worth doing when the bar is slightly over capacity. If two or three icons are disappearing behind the notch, removing a few points from each gap often brings them back with nothing hidden.
It does not help much when the bar is far over capacity. With twenty five icons on a 13 inch laptop, even the tightest spacing will not show them all next to a wide app menu. At that point the choice is between fewer icons and hidden icons.
It also does not address order. Tightening moves every icon closer to the clock, so the icons that were furthest left are the ones that reappear. If the icons you use most are already near the clock, tightening restores the ones you use least. Rearranging first, with a Command drag along the bar, puts the important ones in the safe zone near the clock, and then tightening recovers as many of the rest as possible.
There is a usability cost as well. Every point removed from the gaps also shrinks the area between icons where a click lands on nothing, so a slightly misplaced click opens the neighbouring menu instead. On a trackpad, at the top edge of a large screen, that happens more often than expected. Anyone who already finds small targets tiring should tighten in small steps and stop at the first value that fits the icons, rather than going straight to the minimum.
Finally, it is a global setting. The same spacing applies on the built-in display and on an external monitor. Menu Bar Spacing suggests using its Shortcuts action with automations that run when a display connects, which is the workaround for people who want tight spacing on the laptop and generous spacing on a large screen.
A sensible order of steps
Try these in sequence and stop when the bar fits:
- Turn off icons you never click, under System Settings, Menu Bar, Allow in the Menu Bar on macOS 26 and 27, or in each app's own settings on older versions.
- Hold Command and drag the icons you use most so they sit closest to the clock.
- Tighten spacing with the Terminal commands on macOS 14 to 26, or with a tool that supports spacing on macOS 27.
- If icons still disappear, move the rarely used ones behind a divider with a menu bar manager.
Each step is reversible, and the first two cost nothing and need no extra software.
What to change first
Start by deleting icons you never use and reordering the rest, then tighten spacing by a small step and live with it for a day. If that is not enough, Koffret offers four spacing steps from the macOS default to the tightest alongside hiding icons behind a divider. The pricing page lists the supported macOS versions, and the download page has the 14 day trial.
Frequently asked questions
Is changing menu bar spacing with Terminal safe?
The commands only write two preference values for your user account, and deleting them returns the Mac to its default. The settings are undocumented, so a future macOS update can ignore them, which is what happened on macOS 27.
Why did nothing change after running the commands?
The new spacing appears only after the processes that draw the menu bar restart. Log out and back in, then quit and reopen any third party menu bar apps that still show the old gaps.
Can the gap between app menus on the left be changed too?
No. The hidden settings and the apps that use them only change the status icons on the right side. The left side is laid out by each app's menus and has no spacing control.
Can I use different spacing on my laptop screen and my external monitor?
Not with the system setting, which applies to every display. One workaround is to run a Shortcuts action that sets the spacing whenever a particular display connects, as Menu Bar Spacing supports.
Will tighter spacing stop icons from hiding behind the notch?
It helps when only a few icons are missing. If many are hidden, tighter spacing alone will not bring them all back, and hiding rarely used icons behind a divider is the more reliable fix.