Every Stardew Valley item code worth spawning — Prismatic Shard, Iridium Bar, Galaxy Sword, Ancient Fruit — plus the naming trick that spawns them with no mods at all, and the SMAPI player_add route for modders. The codes still work in 1.6. Search, copy, paste.
Stardew Valley has no console — "item codes" reach the game one of two ways. The first is pure vanilla and works on every platform; the second needs mods on PC.
Vanilla, no mods (the naming trick): wrap an item's code in square brackets and use it as a name — your farmer's name on the new-character screen, or an animal's name at Marnie's Ranch. You can chain up to three, e.g. [74][337][72].
Trigger it: with the farmer-name method, talk to a villager whose dialogue uses your name — Gus at the Stardrop Saloon is the most reliable — and the items drop into your inventory. The animal-name method delivers the moment you buy and name the animal. Rename later at the Wizard's-basement statue to reuse the trick.
With mods (PC): install SMAPI + CJB Item Spawner for a click-to-spawn menu, or type player_add [code] [count] [quality] in the SMAPI console (e.g. player_add 74 for a Prismatic Shard; quality is 0/1/2/4). Find any code live with list_items [name].
(O)74, but the old plain numbers still work for ordinary objects in both the naming trick and player_add — the game resolves a bare number to the first matching type (object → big craftable → … → weapon). You only need the prefix when a number is shared across types, which is why weapons must use the (W) form (Galaxy Sword is (W)4). A wrong or out-of-range number spawns an Error Item, and the naming trick can hand you items before you'd normally unlock them — which can confuse quests or the Community Center.Type to filter, hit Copy, then either wrap it in [brackets] for the naming trick or paste it straight into SMAPI's player_add. Codes are the plain numeric IDs; weapons use the (W) form. The items people spawn most:
| Code | Item | Category |
|---|---|---|
| 74 | Prismatic Shard | Gems & Minerals |
| 72 | Diamond | Gems & Minerals |
| 797 | Pearl | Gems & Minerals |
| 279 | Magic Rock Candy | Gems & Minerals |
| 535 | Geode | Gems & Minerals |
| 537 | Magma Geode | Gems & Minerals |
| 417 | Sweet Gem Berry | Gems & Minerals |
| 337 | Iridium Bar | Ores, Bars & Resources |
| 386 | Iridium Ore | Ores, Bars & Resources |
| 336 | Gold Bar | Ores, Bars & Resources |
| 384 | Gold Ore | Ores, Bars & Resources |
| 382 | Coal | Ores, Bars & Resources |
| 709 | Hardwood | Ores, Bars & Resources |
| 787 | Battery Pack | Ores, Bars & Resources |
| 428 | Cloth | Ores, Bars & Resources |
| 440 | Wool | Ores, Bars & Resources |
| 768 | Solar Essence | Ores, Bars & Resources |
| 769 | Void Essence | Ores, Bars & Resources |
| 434 | Stardrop | Iconic & Rare |
| 454 | Ancient Fruit | Iconic & Rare |
| 107 | Dinosaur Egg | Iconic & Rare |
| 446 | Rabbit's Foot | Iconic & Rare |
| 928 | Golden Egg | Iconic & Rare |
| 166 | Treasure Chest | Iconic & Rare |
| (W)4 | Galaxy Sword | Weapons & Rings |
| (W)23 | Galaxy Dagger | Weapons & Rings |
| (W)29 | Galaxy Hammer | Weapons & Rings |
| (W)62 | Infinity Blade | Weapons & Rings |
| (W)64 | Infinity Dagger | Weapons & Rings |
| (W)63 | Infinity Gavel | Weapons & Rings |
| (W)9 | Lava Katana | Weapons & Rings |
| 801 | Wedding Ring | Weapons & Rings |
| 527 | Iridium Band (ring) | Weapons & Rings |
| 128 | Pufferfish | Fish & Artisan Goods |
| 136 | Largemouth Bass | Fish & Artisan Goods |
| 430 | Truffle | Fish & Artisan Goods |
| 432 | Truffle Oil | Fish & Artisan Goods |
| 445 | Caviar | Fish & Artisan Goods |
| 348 | Wine (base) | Fish & Artisan Goods |
| 340 | Honey (base) | Fish & Artisan Goods |
| 395 | Coffee | Fish & Artisan Goods |
| 645 | Iridium Sprinkler | Farming & Bombs |
| 621 | Quality Sprinkler | Farming & Bombs |
| 466 | Deluxe Speed-Gro | Farming & Bombs |
| 286 | Cherry Bomb | Farming & Bombs |
| 288 | Mega Bomb | Farming & Bombs |
Flavored goods share a base code — Blueberry Wine and plain Wine are both 348, with the flavor stored separately — so a spawned 348 is generic Wine. For big craftables, tools and furniture whose number collides with an object, use CJB Item Spawner or player_add with the qualified prefix (e.g. (BC)) rather than the naming trick.
74, Diamond is 72. In 1.6 these became string IDs with a type prefix, the qualified form like (O)74. You use these codes to spawn items via the in-game naming trick (vanilla) or through SMAPI mods.[74][337][72]. With mods, install SMAPI + CJB Item Spawner for a click-to-spawn menu, or type player_add [code] [count] [quality] in the SMAPI console.player_add. The only items that require the new qualified prefix are ones whose number is shared across item types — most notably weapons, which is why Galaxy Sword is (W)4.list_items [name] (e.g. list_items shard) to read any ID straight from your own game files.Inventory sorted? Here's the rest of the toolkit.