Create the missing IconSpacing and IconVerticalSpacing string values under HKEY_CURRENT_USER\Control Panel\Desktop\WindowMetrics, set both initially to -1128, and restart Windows.
Create the missing values
Registry changes can cause problems if entered incorrectly, so export this key first: in Registry Editor, select WindowMetrics, then choose File > Export and save the .reg file.^1^
- Press Windows key + R, enter
regedit, and select OK. - Go to:
The key is named WindowMetrics—one word.HKEY_CURRENT_USER\Control Panel\Desktop\WindowMetrics - In the right pane, right-click an empty area and select New > String Value.
- Name it exactly:
IconSpacing - Double-click it and set Value data to:
-1128 - Create another String Value named:
IconVerticalSpacing - Set its value to:
-1128 - Close Registry Editor and restart the PC.
IconSpacing controls horizontal spacing; Microsoft’s Win32 documentation identifies it as the spacing between icons.^2^ IconVerticalSpacing controls the height of the icon arrangement cell.^3^ The -1128 setting has also been used successfully for Windows 11 desktop-spacing problems.^4^
If you want them even closer
There is no Microsoft-supported Settings control for independently selecting exact horizontal and vertical spacing, and the available official documentation does not specify a safe registry-value range for Windows 11. Therefore:
- Start with
-1128and check the result after restarting. - Avoid extreme or guessed values that could overlap icons or labels.
- To undo the change, import the
.regbackup using Registry Editor > File > Import.^1^
For a supported alternative that fits more icons without editing spacing directly, right-click the desktop and select View > Small icons. You can also hold Ctrl and use the mouse wheel to resize them.^5^
References
- [Windows 11](https://support.microsoft.com/windows/experience/backup-recovery/how-to-back-up-and-restore-the-registry-in-windows#back-up-the-registry-manually)
- Win32_Desktop class
- SystemInformation.IconVerticalSpacing Property-Definition
- Bug with desktop icons after updating to W11 24H2 - Microsoft Q&A
- Customize the Desktop Icons in Windows | Microsoft Support