How to Automatically Sort Files by Name on Your Mac Desktop

The Mac desktop is incredibly convenient for temporarily storing screenshots, downloaded PDFs, and active project folders. However, if you are not rigorous about filing those items away, the desktop quickly becomes an unreadable, chaotic mess of overlapping icons scattered randomly across the wallpaper. Trying to find a specific document in that visual noise is immensely frustrating. Instead of dragging each icon into place manually, you can instruct macOS to instantly snap every file into a perfect, alphabetized grid.

The Difference Between Sorting and Cleaning Up

macOS offers two distinct ways to organize your desktop icons: a temporary fix and a permanent rule.

Method 1: The Temporary Fix (Clean Up By)

If you just want to neatly arrange the current mess into a grid, but you still want the freedom to drag new icons wherever you want later, you should use the “Clean Up” feature.

  1. Right-click (or hold Control and click) on any completely empty space on your desktop wallpaper.
  2. In the menu that appears, hover your mouse over Clean Up By.
  3. A secondary menu will slide out. Click on Name.

All your icons will instantly fly into an invisible, alphabetized grid on the right side of your screen. However, you are still free to drag an icon out of the grid and leave it stranded in the middle of the screen.

Method 2: The Permanent Rule (Sort By)

If you want the Mac to enforce strict organization permanently, so that no icon is ever allowed to fall out of line, you must use the “Sort” feature.

  1. Right-click on an empty space on your desktop.
  2. Hover your mouse over Sort By.
  3. Click on Name.

The icons will immediately snap into an alphabetized grid. The crucial difference is that this grid is now locked. If you try to click and drag a folder to the middle of the screen, the Mac will instantly rip it out of your hands and snap it back into its correct alphabetical slot. Furthermore, any new file you save to the desktop will automatically jump to its proper alphabetical position without you having to do anything.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.