Configure item sorting
Use /sort to choose how you sort your inventory and containers.
Automatic container sorting starts off. Use /sort on, /sort off, or /sort toggle to change it. When enabled, a container sorts when you close it.
For an immediate sort, use /sort inventory, /sort hotbar, or /sort all. You can also sneak and punch a chest, barrel, shulker box, or ender chest with an empty hand.
With an inventory open, enabled click shortcuts sort the inventory you click. Middle-click, shift-left-click, double-click, or shift-right-click an empty slot with an empty cursor. Use /sort hotkeys to toggle click shortcuts, or /sort to adjust individual settings. Sorting respects container access.
To move items into separate containers by type, see deposit shelves.