Item sorter in Minecraft: an automatic storage system
Chests full of cobblestone, arrows, bones and gunpowder: after a few hours of playing with farms, your storage is chaos. An item sorter automatically sends every item to the right chest. Below you'll build one step by step, from a basic hopper sorter to a multi-channel system with overflow protection.
How a hopper sorter works
You'll often read that a hopper sorter relies on one Minecraft mechanic: a hopper only pulls in items that match the items already inside it. If a hopper holds cobblestone, it will only pull cobblestone from the hopper above, and everything else moves on along the line.
That's not true. In reality, a hopper pulls in any item as long as it has free space. The trick is to make sure the filter hopper never has free space for unwanted items. That's why you fill 4 of the 5 slots with blocker items (renamed sticks) and keep the sorted item in the remaining slot. When the sorted item drops from the line into the filter hopper, the hopper fills up and the comparator detects the change in signal: it unlocks the bottom hopper, which pulls the sorted item down into the chest.
Layout of one sorting module
One sorting module (one item type) is made of:
- Line hopper (top row): carries all items along the line.
- Filter hopper (under the line): holds the filter (1x sorted item + 4x renamed stick). It pulls matching items from the line.
- Redstone circuit (comparator + repeater + dust): locks the output hopper while the filter hopper is empty and unlocks it when the filter hopper fills up.
- Output hopper (under the filter hopper): moves the sorted items into the chest.
- Storage chest: a double chest for that item type.
Materials: what you need
For one sorting module (one item type):
| Item | Amount | Crafting materials |
|---|---|---|
| Hopper | 3 | 15 iron ingots + 3 chests |
| Chest | 2 (double chest) | 16 planks |
| Redstone comparator | 1 | 3 redstone torches + 1 Nether quartz + 3 stone |
| Redstone repeater | 1 | 2 redstone torches + 1 redstone dust + 3 stone |
| Redstone dust | 2 | 2 redstone (mine at Y=-59) |
| Solid blocks | 3-5 | Cobblestone |
| Renamed stick | 4 | 4 sticks + anvil + XP |
A sorter for 10 items needs: ~35 hoppers (105 iron ingots), 10 comparators (10 Nether quartz), 10 repeaters, 20 redstone dust and 40 renamed sticks.
Iron is the biggest cost. If you don't have an iron farm, build one before the sorter: a villager iron farm produces hundreds of ingots per hour.
Step-by-step build: a basic sorter
We'll build a sorter for 5 items plus an overflow. You can add more modules to it at any time.
Step 1: The hopper line
Place a row of 7 hoppers (5 for sorting + 1 for the input + 1 for the overflow). Each hopper points into the next one: sneak (Shift) and right-click the neighboring hopper. The hopper's spout must face the next hopper in the row.
Put a double chest on the first hopper (the input). You drop items into it, and the hoppers carry them along the line.
Step 2: Filter hoppers
Under each of the 5 line hoppers (the sorting slots), place a hopper pointing sideways, toward where the storage chest will go. Sneak and click the block next to it (not the hopper underneath).
In each filter hopper put:
- Slot 1: 1 of the item you're sorting (for example cobblestone).
- Slots 2-5: 1 renamed stick each.
Renamed sticks are sticks renamed on an anvil (for example a, b, c, d). Because of the new name they don't stack with normal sticks and won't show up in any farm's item stream. They take up 4 slots and keep them blocked against random items.
Step 3: The redstone circuit
Behind each filter hopper (at the back, on the side opposite the chest), place:
- Redstone comparator: directly behind the hopper, with the comparator's arrow pointing away from the hopper (output away from the hopper). The comparator must be in compare mode (don't click it a second time: it's in the right mode by default).
- Redstone dust: 1 block behind the comparator.
- Redstone repeater: after the dust, facing away from the comparator.
- Redstone dust: after the repeater, leading to the block next to the bottom hopper.
- Solid block: next to the bottom hopper (the hopper under the filter hopper). The redstone dust on this block locks the hopper while the signal is on.
How it works: the comparator measures how many items are in the filter hopper. With 5 items in it (1 sorted + 4 renamed sticks), the signal is weak. When another sorted item drops in from the line (6 items), the signal gets stronger: the repeater boosts it and unlocks the bottom hopper. The bottom hopper pulls the extra items down into the chest. When the filter hopper is back to 5 items, the signal drops and the bottom hopper locks again.
Step 4: Storage chests
Next to each output hopper (under the filter hopper), place a double chest. The output hopper must point into the chest (spout facing the chest). Sorted items travel: line → filter hopper → output hopper → chest.
Step 5: Test it
Drop a mix of items into the input chest (cobblestone, arrows, bones, gunpowder, string: whatever you're sorting). Watch the items travel along the line. Each item should land in its own chest. Items without a filter move on to the end of the line.
Overflow: protection against clogging
The overflow is the most important part, and the one beginners forget. Without an overflow, the system jams as soon as any chest fills up or an unfiltered item enters the line.
What an overflow is
The overflow is a chest at the end of the line that catches every item that didn't get sorted. The last hopper of the line points into the overflow chest (or into another hopper leading to the chest).
Why you need one
- Unfiltered items: if an item you don't sort enters the line (for example a spider eye when you have no filter for it), it would get stuck in the line and clog the whole system.
- Full chests: when a storage chest is full, the hopper above it stops pulling items, so the item goes back on the line and moves on. The overflow catches it.
- Safety: the overflow is your buffer. Check it and empty it regularly. If the overflow fills up, the whole sorter stops.
An overflow with an alarm
Want to know when the overflow is filling up? Place a comparator behind the overflow chest, leading to a redstone lamp or a note block. When the chest is 50%+ full, the comparator sends a signal: the lamp lights up or the note block plays a sound. Simple, and it saves you from a clogged system.
Expanding to a multi-item sorter
A basic sorter handles 5-10 items. In practice you need to sort 20-40 types. Here's how to scale up.
A longer line
The simplest solution: extend the line with more hoppers and add sorting modules. Each new module is 3 hoppers, 1 comparator, 1 repeater, 2 redstone dust and a chest. The line can have 30+ hoppers without problems.
The limitation: the longer the line, the longer items take to travel from the input to their filter. With 30 hoppers, an item at the end waits ~12 seconds. With high throughput (for example a farm producing 5+ items per second), the modules further down may not keep up.
Parallel lines
For large systems (20+ types), build 2-3 parallel lines. The input chest leads to a splitter (a hopper pointing into the first line, with its overflow going to the second). Each line sorts different item types.
Sorting priority
Put the items you produce the most of at the start of the line (closer to the input). Cobblestone, dirt and other bulk items should be sorted first; otherwise they clog the line by the time they reach the later modules.
Labeling your chests
With 20+ chests it's easy to get lost. Three ways to label them:
- Item frames: put an item frame on the chest and place the sorted item in it. It's a visual label: you see right away what's in the chest.
- Signs: put a sign above or next to the chest with the item's name.
- Colored blocks: behind each chest, place a block in the color of its category (green = plants, gray = stone, red = redstone).
Sorting unstackable items
A standard hopper sorter doesn't work with unstackable items (armor, tools, swords, bows, buckets, potions, saddles). The reason: each renamed stick in the filter hopper takes up 1 slot. An unstackable item also takes up 1 slot, so the hopper can't tell them apart.
Method 1: Allay sorter
Allays (since version 1.19) can sort unstackable items. An allay collects items identical to the one it's holding and carries them to the nearest note block.
How to build it:
- Enclose the allay in a small chamber (2x2x3).
- Give the allay a sample item (for example a diamond sword).
- Place a note block in the allay's chamber.
- Drop the items from your farm within the allay's range (32 blocks).
- The allay collects the matching items and brings them to the note block, where they drop onto a hopper and into a chest.
The limitation: an allay sorts by item type, not by enchantments. All diamond swords (with any enchantments) end up in the same chest.
Method 2: Shulker box sorter
An advanced method: unstackable items go into a shulker box through a hopper. When the shulker box is full, a dispenser pushes it out onto a transport hopper, which moves it to the storage chest. An empty shulker box goes back into the loading position. This design needs advanced redstone (a clock, a dispenser, comparators) and shulker boxes from the End.
Hooking it up to farms
A sorter is useful on its own, but it shows its real power when it's connected to farms. Here are the most common setups:
Mob farm + sorter
Connect the output of a mob farm directly to the sorter's input chest. Filter: bones (slot 1), arrows (slot 2), gunpowder (slot 3), rotten flesh (slot 4), string (slot 5). Armor and tools from zombies and skeletons go to the overflow (a standard filter can't sort them).
Villager farm + sorter
A crop farm (wheat, carrots, potatoes, beetroots) worked by farmer villagers produces large amounts of food. Connect the hoppers from the field to the sorter's line. Filter by crop type.
Auto-loading furnace
A hopper on top of the furnace puts in the raw materials. A hopper on the side puts in fuel. A hopper under the furnace takes out the finished product and sends it to the sorter. An automatic system: raw iron → furnace → iron ingot → sorter → iron chest.
Central storage
The most ambitious project: every farm in your base sends its hoppers into one central sorting line. One huge sorter handles 30-50 item types. The chests are arranged in a storage wall and labeled with item frames. The result: you walk into your storage room and know right away where every resource is.
Troubleshooting
The sorter mixes up items
- Check the filter hoppers: are there renamed sticks in slots 2-5? If those slots are empty, the hopper pulls random items from the line.
- Check the comparators: they must be in compare mode (front torch unlit). Right-click a comparator to switch its mode.
- Check which way the hoppers face: the filter hopper must point sideways (into the chest or the output hopper), NOT down.
Items get stuck in the line
- Check which way the line hoppers face: each one must point into the next. A single hopper facing the wrong way blocks the whole flow.
- Full overflow: if the overflow chest is full, the last hopper of the line has nowhere to push items. Empty the overflow.
- Full storage chest: the output hopper is full, the filter hopper is full and the line stops. Replace the chest with a bigger one (a double chest) or add a second row of chests.
Renamed sticks disappear from the hoppers
- The redstone circuit is wired wrong: if the bottom hopper isn't locked, it pulls the renamed sticks out of the filter hopper. Check that the repeater faces the right way and that the redstone dust connects to the block next to the bottom hopper.
- The comparator is broken or missing: without a comparator, the circuit doesn't lock the bottom hopper. Check that the comparator is in place.
The sorter is too slow
- A hopper moves 2.5 items per second. With high production (a creeper farm) that's not enough. The fix: parallel lines or a buffer (extra chests before the input, with hoppers pulling from them).
- Move bulk items to the start of the line. Cobblestone, dirt and other items that clog the line should be sorted first.
Frequently asked questions (FAQ)
How many hoppers do I need for an item sorter in Minecraft?
For each sorted item: 2-3 hoppers (filter + output + line). A sorter for 10 types needs ~35 hoppers. For 20 types: ~65 hoppers. Iron is the main cost: 5 ingots per hopper, so 325 ingots for a 20-type sorter.
What do I put in the filter hopper?
Slot 1: 1 of the item you're sorting. Slots 2-5: 1 renamed stick each (a stick renamed on an anvil). The renamed sticks block those slots, so the hopper doesn't pull anything from the line that doesn't match slot 1.
Does an item sorter work on Bedrock Edition?
Yes, with some caveats. Redstone behaves differently in Bedrock (random delays, a different tick priority). The basic comparator design works, but build it in modules and test each one separately before expanding.
How do I sort unstackable items?
A standard hopper sorter doesn't sort unstackable items (armor, tools, potions). Use allays (since 1.19): give an allay a sample item and it will collect identical ones. Alternatively, build a shulker box sorter (advanced redstone).
Why does my item sorter break and mix up items?
Check: (1) the renamed sticks in slots 2-5 of the filter hopper, (2) the comparator is in compare mode, (3) the direction of the filter hopper (sideways, not down), (4) the redstone circuit that locks the bottom hopper.
How many items per second does a hopper move?
2.5 items per second (1 every 8 game ticks). That's 150 per minute and 9,000 per hour. With high production, build parallel lines or a buffer of chests.
A well-built sorter is the foundation of an advanced Minecraft base. Once it's built, it saves you dozens of hours of sorting by hand. Start with 5 item types and expand to 20-30 as your farms grow. Remember the overflow, the chest labels and regular checks that the renamed sticks are still in place.
If you don't have a mob farm to connect the sorter to yet, see our mob farm guide. You'll find the redstone basics you need to understand comparators and repeaters in our redstone guide. And once your central storage is built, it's time to think about automatic farms to fill it.