Is it possible to duplicate an item in Stardew Valley?

There is, yes, though it may depend on what device you're playing the game on. The 'Stardew Valley Item ID Glitch' allows you to spawn items that you can then sell to generate resources you want. You can perform it by naming either your character or an animal you own after the game's item codes. By doing this, the item will spawn every time that name is referenced (so, whenever you talk to the animal). Also, you can find all game item codes at this website. So, for example:

  • A chicken named [72] will spawn a diamond whenever you talk to it, because diamonds are item 72 in the game code.
  • A chicken named [60][64] will spawn an emerald and a ruby when you talk to it, because 60 and 64 are those items' IDs in the game code.

In an interview with IGN, the Stardew Valley developer confirmed he finds this glitch charming and doesn't plan to patch it out, so it can be used without fear:

“I am aware of it, but I don’t think I want to fix it,” Barone said. “It's not game-breaking, it's kind of amusing, and the likelihood that someone would randomly stumble upon it is extremely low. So I feel like it's okay to leave it, and actually kind of fun.”

However, this is no longer possible on Switch as of December 2018 (version 1.3), as Nintendo mandated that that the glitch be fixed there.