You’ve seen the videos. Someone walks into Pierre’s General Store, buys a single soup, and suddenly their inventory is flooded with Prismatic Shards and Legend fish. It looks like magic. Honestly, it looks like a glitch that should have been patched out years ago. But the Stardew Valley item code exploit—often called the "Naming Cheat"—is one of those weird, enduring quirks of ConcernedApe’s masterpiece that just refuses to die.
It's basically a rite of passage.
Most players stumble onto this when they realize they’ve spent three real-life days trying to find a single Dino Egg and their patience finally snaps. You change your name to a string of numbers, talk to Gus at the saloon, and boom. Items appear. It feels dirty, sure, but in a cozy farming sim, who are you really hurting? The ethics of digital farming aside, there is a lot of technical nuance to how these IDs function, especially following the massive 1.6 update that shook up the internal data structures of the game.
The Mechanical Reality of the Stardew Valley Item Code
Let’s get the "how" out of the way first. The game uses a system where every object—from a piece of Driftwood to the elusive Magic Herb Bait—is assigned a unique numerical ID. When the game’s code triggers a dialogue box that mentions your character’s name, it parses the string. If it sees a number wrapped in brackets, like [74], it doesn't just display those characters. It treats that string as a command to spawn the item associated with that ID directly into your pockets.
It’s a loophole.
It exists because of how the game handles string interpolation. Usually, a developer would sanitize this input to make sure players can't execute "commands" via their nickname, but Eric Barone (ConcernedApe) famously left it in. He even added a cheeky bit of dialogue where Mr. Qi calls you out for cheating if you try certain exploits. That’s the charm of Stardew. It knows you’re breaking it, and it mostly just watches with a smirk.
Why the 1.6 Update Changed Everything
For years, we all memorized the classics. [74] was the Prismatic Shard. [163] was the Legend. [166] was Treasure Chests. But the 1.6 update was a massive overhaul. It moved the game toward a more "mod-friendly" architecture. This meant that while the old numerical IDs often still work for legacy items, many new items and even some old ones transitioned toward "qualified item IDs."
Basically, instead of just a number, the game now prefers strings like (O)74. The "O" stands for Object. There are also (BC) for Big Craftables, (T) for Tools, and (H) for Hats.
If you’re playing on a console, I’ve got bad news. This exploit was largely scrubbed from the Switch, PlayStation, and Xbox versions because of platform requirements from Nintendo and Sony. They have strict rules about "code injection" vulnerabilities. However, on PC and Mobile, the Stardew Valley item code remains a powerhouse for those who want to skip the grind.
The Most "Profitable" Codes You’ll Actually Use
If you’re going to do this, don’t waste your name slots on junk. You only get so many characters in a name. You want the heavy hitters.
The Prismatic Shard [74]
This is the gold standard. You need it for the Galaxy Sword. You need it for the Missing Bundle. You need it to appease the Junimos in the late game. If you name yourself [74], every time an NPC says your name, you get one. Imagine talking to Gus when he’s in a chatty mood. You’ll leave the saloon with twenty shards.
The Legend [163]
Selling for a base of 5,000g (and way more with the Angler profession), this is the fastest way to break the early-game economy. It’s technically an "out of season" item most of the time, but the code doesn't care about the weather or the calendar.
Stardrop [434]
This one is risky. Using the code for a Stardrop can sometimes lead to inventory glitches because Stardrops are meant to be consumed immediately to increase your max energy. If you spawn it into an inventory slot, it can behave... weirdly. But hey, maximum energy in Spring 1 is a tempting fruit.
The "Magic" of the Chicken Glitch
If you don't want to change your name at the Shrine of Illusions (which costs 500g), you can use the Chicken Glitch. Buy a chicken from Marnie. When she asks you to name it, give the chicken the code, like [74][163][166]. The moment she finishes the transaction and says, "Okay, I'll send little [74][163][166] to their new home," the items pop into your inventory.
Then you sell the chicken. Or keep it as a living, clucking monument to your crimes against game balance.
A List of Essential Codes (The 2026 Refined List)
- [74] - Prismatic Shard (Universal love, high value)
- [163] - Legend Fish (Best for raw cash)
- [166] - Treasure Chest (Sells for 5,000g, no questions asked)
- [797] - Pearl (Great for gifting, beautiful to look at)
- [373] - Golden Pumpkin (Another 2,500g sellable)
- [499] - Ancient Seeds (To get that winery started early)
- [910] - Radioactive Ore (For the late-game crafters)
Managing the Side Effects
There’s a catch. There’s always a catch.
Using a Stardew Valley item code as your name can make the dialogue look absolutely ridiculous. Imagine Lewis saying, "Morning, [74]! How is the farm?" It completely breaks the immersion. If you’re playing for the story and the vibes, this will ruin it. You’ll stop seeing the characters as friends and start seeing them as vending machines.
Also, your inventory fills up fast. If your name has three codes in it, and you talk to someone with a full inventory, those items just drop on the floor. If you aren't careful, you’ll leave a trail of legendary artifacts all over the town square like a very rich, very forgetful Hansel and Gretel.
Limitations and the "Hard Caps"
You can’t just put thirty codes in your name. The character limit for your name is narrow. Most players find they can fit about two or three codes if they use the short ones.
👉 See also: How Long Is a Game? Why Playtime Estimates Are Usually Wrong
- Character Limits: You usually have a 32-character limit, but the practical limit for item spawning is often shorter depending on the platform version.
- Dialogue Frequency: Some NPCs talk more than others. If you’re hunting for items, hang out at the Saloon on Friday nights. It’s the highest "item-per-minute" location in the game.
- The "Qi" Factor: In the 1.6+ versions, if you try to use codes for certain restricted items (like the Statue of Perfection), the game might give you a "Naughty" junk item instead. Barone is clever. He knows people use these lists.
Why Do We Still Use These?
It’s about the "Late Game" wall.
Stardew Valley is a masterpiece, but the grind for 100% Perfection is real. When you’re 200 hours in and you just need one more Iridium Bar to finish a project, or you've lost your sword in the mines and don't want to reset the day, the Stardew Valley item code is a safety net.
It’s also a tool for testers. Modders use these codes constantly to verify that their custom maps can handle high-value item spawns. It’s part of the game’s DNA now. It’s less of a "cheat" and more of a "debug mode for the people."
Expert Tip: The "Animal Buy" Rotation
If you're really looking to optimize, don't just stick to chickens. Every time you buy an animal from Marnie, you have a fresh chance to input codes.
- Buy a Cow:
[645](Iridium Sprinkler) - Buy a Pig:
[499](Ancient Seeds) - Buy a Goat:
[337](Iridium Bar)
This allows you to target exactly what you need for your farm’s current stage without permanently scarring your character’s name for the rest of the playthrough. Once the animal is named, the item is yours, and the animal just exists with a weird numerical name forever. You can even rename the animal later through its info menu, and it won't trigger the spawn again. It's a one-time deal.
Looking Forward: Will This Work in Haunted Chocolatier?
The big question in the community is whether ConcernedApe will allow this in his next game, Haunted Chocolatier. Given the shift in the engine and the more robust data handling he's implemented in Stardew 1.6, it's unlikely. This specific exploit is a relic of how Stardew was originally built—one man, a lot of C# code, and a dream.
Modern game engines usually separate "display text" from "logic commands" much more strictly. So, enjoy the Stardew Valley item code while you can. It’s a window into a specific era of indie game development where the borders between the player and the code were a little more porous.
Actionable Steps for Your Next Save
If you want to try this without bricking your experience, follow this specific path:
- Start a "Burner" Save: Don't do this on your main 5-year farm first. Create a new character, name them
[74][163], and see how the pacing feels. It changes the game from a farming sim to a logistics sim very quickly. - Use the Shrine of Illusions: If you're already mid-game, don't restart. Get to 4 hearts with the Wizard, go into his basement, and use the shrine to change your name. Grab what you need, then change it back to something human.
- Verify Your Version: If you are on PC, ensure you aren't using mods that "sanitize" player names. Some total conversion mods like Stardew Valley Expanded don't break this, but some UI overhaul mods might.
- Focus on the Missing Bundle: Use the codes for the rare items like the Prismatic Shard or the Dino Egg
[107]if you're stuck on the Joja vs. Community Center endgame. It saves dozens of hours of RNG frustration.
The item code system is a tool. Like a hammer, you can use it to build a beautiful house faster, or you can accidentally smash your thumb and ruin the fun. Use it sparingly, and it becomes a way to bypass the parts of the game that feel like a chore, letting you get back to the parts you actually love—like finally marrying Sebastian or decorating that shed.