Mac menu bar spacing: how to tighten it, and what it fixes

Menu bar icons on a Mac are laid out with more room between them than the icons themselves need. With five items that padding is invisible. With fifteen it is a measurable slice of the bar, and on a MacBook with a camera housing in the middle of the screen it is often the difference between seeing every icon and silently losing the ones on the far side. The spacing can be changed, but not from System Settings, and the method has trade-offs worth understanding before typing anything into a terminal.

Why System Settings has no spacing control

What the settings interface offers for the menu bar is a short list: whether each system item appears, how the clock is formatted, and whether the bar hides itself automatically. Order is not there either, though it can be changed by holding Command and dragging an icon along the bar.

Spacing is not in that list. It exists because macOS stores the value in a preferences domain that the defaults command can write to, and the layout reads it when the bar is drawn. Nothing in the interface exposes it, which puts this squarely in the category of undocumented adjustment.

That has two practical consequences. The behaviour is not guaranteed across macOS releases, so an update can reset it or stop honouring it. And when it does not work there is no official troubleshooting to fall back on, so you diagnose it yourself.

The reassuring part is that it is reversible. The change is a stored value, and deleting the value returns the layout to whatever the system does by default. Nothing is patched, replaced, or disabled, so trying it and abandoning it costs one log out.

The two values that decide the width

Two keys are involved, and they are easy to confuse because both affect horizontal space.

NSStatusItemSpacing is the gap between one icon and the next. Reducing it pulls the whole row together, and because there is one gap per pair of icons, the saving scales with how many items are in the bar. On a Mac carrying a dozen or more icons this is the value that produces a visible result on its own.

NSStatusItemSelectionPadding controls the area highlighted around an icon when it is clicked. That region is part of each item's footprint, so shrinking it tightens the row further. Visually it is the subtler of the two: it changes how much background appears behind an active icon, which affects how obvious it is that something is selected.

The order to change them in follows from that difference. Adjust spacing first and live with it for a day. Only if the result is still not enough should the selection padding come down, since it is the value that costs clarity rather than comfort.

Both taken to an extreme produce a row that reads as a single block, with no visual separation between neighbouring icons. That is where the tightening stops paying: the width was recovered, but picking the right icon now takes longer.

How far is too far

The safe floor depends less on eyesight than on the pointing device. With a mouse, aiming at the top edge of the screen is precise enough that tight spacing rarely causes mistakes. With a trackpad, especially when flinging the pointer to the top of the screen in one motion, landing one icon over becomes common. If both are in use, judge the result with the trackpad rather than the mouse.

The commands

Both values are written with defaults, in points, where smaller numbers mean a tighter bar.

defaults -currentHost write -globalDomain NSStatusItemSpacing -int 6
defaults -currentHost write -globalDomain NSStatusItemSelectionPadding -int 6

Starting at 12 rather than 6 is the more forgiving approach. It gives back a useful amount of room while keeping the icons visually distinct, and it can always be lowered afterwards.

Nothing changes until the menu bar is rebuilt. This is the single most common reason people conclude the trick does not work. Writing the value does not redraw anything. Logging out and back in is the reliable way to apply it, and a restart does the same. Terminating SystemUIServer is often suggested and does not take effect on every macOS version, so treat a log out as the real test rather than as a last resort.

Because each attempt costs a log out, it helps to plan for two or three rounds rather than expecting to land on the right number immediately. Write a value, log out, look at the bar, decide whether to go lower.

It is also worth writing down what you set. Six months later, when the bar looks subtly wrong after an upgrade, the fastest fix is rewriting the same two lines, and the fastest way to know they were ever set is a note rather than memory. A comment in whatever file holds your other setup commands is enough. Without it, an upgrade that quietly restores the original layout reads as an unexplained change in how the Mac looks, and people often spend longer diagnosing that than the original adjustment took.

Undoing it, and why it sometimes does nothing

To reverse the change, delete the values rather than writing what you believe the original numbers were.

defaults -currentHost delete -globalDomain NSStatusItemSpacing
defaults -currentHost delete -globalDomain NSStatusItemSelectionPadding

With no value stored, the system uses its own layout again, which is more dependable than guessing a default. As with setting them, the deletion only appears after logging out.

When a change appears to do nothing, there are three things to check, in order of how often they turn out to be the cause.

The first is the log out, which accounts for most cases. The second is the key name. A misspelling does not produce an error, because defaults will happily store any key you name, so the command reports success while nothing reads the value. Reading the value back with defaults -currentHost read -globalDomain NSStatusItemSpacing confirms what was actually written.

The third is that not every icon obeys it. The values apply to items drawn through the standard status item mechanism. Applications that draw a custom view carry their own internal padding, and those icons keep their original width while everything around them tightens. An uneven result is usually this, not a mistake in the command.

One more thing to expect: a major macOS upgrade can leave the spacing back at its original width. Values that are not exposed in the interface are not covered by any compatibility promise, so it is worth rechecking after an upgrade rather than assuming the setting survived.

How much width this actually buys

The gain is proportional to how many icons are present, since the padding sits between them.

Situation Effect of tightening Better approach
Five icons or fewer Barely noticeable Nothing needed
Around ten icons Room for one or two more Tighten the spacing
Twenty or more icons Still does not fit Reduce how many are shown
Menu heavy apps in daily use Depends on the frontmost app Keep most icons collapsed

The bottom two rows are the limit of this technique. Spacing is a finite amount of width, and once it has been spent there is nothing left to reclaim, while the count of installed background apps tends to keep rising. Past a certain number the two costs cross: the bar fits, but every click needs aiming.

The other limit is that available width is not constant. Application menus on the left take priority, so switching to an app with a long menu can push status icons off the end regardless of how tightly they are packed. Tightening delays that point. It does not remove it.

Cheaper adjustments to try first

Two changes cost nothing and are worth doing before touching an undocumented value.

The clock is the first. Showing the day and the date adds characters at the right end of the bar, and every character pushes the icons along. Turning the date off can recover close to an icon's worth of room by itself, with no terminal involved.

The second is the Control Center pane in System Settings, where system items such as Bluetooth, Screen Mirroring, Battery, and Time Machine can be removed from the bar. Removing them does not disable them, because they remain available inside Control Center. Anything used a few times a month belongs there rather than in the bar, and clearing three or four of them often solves the problem outright.

It also helps to know the shape of the constraint. On MacBook models with a camera housing, no item can occupy the centre of the bar, so the usable width is narrower than the display size suggests. That is why the full set of icons appears on an external display and not on the built in one, and no amount of tightening changes the geometry.

If all of that has been done and the bar is still full, what remains is third party icons that have no option to hide themselves and cannot be quit without stopping the work they do. At that point the problem has stopped being spacing and has become placement.

Order matters as much as spacing

Tightening is only half of what determines how much work the bar costs. The other half is where each icon sits, and that is free to change.

The pointer spends most of its time in the upper right of the screen, which makes the right end of the status area the cheapest place to reach and the left end the most expensive. Icons that are clicked several times a day belong on the right. Icons that are only read, such as a sync indicator or a battery reading, work just as well on the left, because looking at something costs no travel at all.

The gesture is to hold Command and drag an icon along the bar. Only the status area responds, and Control Center and the clock stay pinned at the far right. The arrangement persists across restarts, so this is a one time exercise.

On a setup with more than one display, there is a second layout question. In System Settings under Desktop and Dock, the Mission Control group has an option for displays having separate Spaces. With it enabled, every display draws its own menu bar, and the width limit is calculated per display. That is why a laptop screen can drop icons while a wide external display beside it shows all of them, and it explains a bar that looks complete at a desk and truncated on the move.

Neither adjustment recovers a single pixel of width. Both reduce the time spent using the bar, which is usually the real complaint behind wanting more room in the first place.

What to change first

Turn the date off in the clock, clear the Control Center items you do not use, and see what is left. If the row is merely tight, set NSStatusItemSpacing to 12, log out, and judge it with a trackpad rather than a mouse. If instead there are more icons than any spacing value can fit, the fix is keeping them installed but out of sight, which is what Koffret does, and How it compares sets out the differences between the tools in that category as plain facts.

Frequently asked questions

Can menu bar spacing be changed without the terminal?

Not directly. System Settings covers which system items appear, the clock format, and automatic hiding, but it has no spacing control. The two values that govern it are written with the defaults command, which means the terminal is required unless a third party tool exposes the same values.

Why did the spacing command have no effect?

The most likely reason is that the menu bar was never rebuilt. Log out and back in, or restart, since writing the value alone changes nothing on screen. If it still looks the same, read the value back to confirm the key name was typed correctly, because a misspelled key is stored without any error.

Why did only some icons get closer together?

Icons drawn through the standard status item mechanism follow these values. Applications that draw a custom view supply their own padding and keep their original width, so a bar with a mix of both tightens unevenly. That is expected behaviour rather than a failed command.

Will a macOS update reset the spacing?

It can. These keys are not exposed in System Settings and are not covered by any compatibility guarantee, so a major upgrade may restore the original layout or stop reading the values entirely. Rechecking after an upgrade, and rewriting the values if needed, is part of using this adjustment.

Back to all posts