Uchide-no-Kozuchi (打ち出の小槌) known in English as "Uchide's Mallet" is a legendary Japanese "magic hammer" which can "tap out" anything wished for. This treasure is also rendered into English as "magic wishing mallet" or "lucky hammer," "the mallet of fortune", etc.
In popular belief, magic wooden hammer is a standard item held in the hand of the iconic deity Daikoku-ten, who is often represented as figurines, statues, netsukes, and in architecture.
It is also a stock item in popular tales. In Issun-Bōshi ("One-Inch Boy"), the hero gains the mallet defeating an ogre (oni) and amass wealth, while in modern embellishments, he even transforms himself into full adult-size. In Momotarō ("Peach Boy"), the mallet is captured from the ogres in Onigashima, alongside the kakure mino (raincoat of invisibility) and kakurekasa (hat of invisibility).
The notion that ogres possessed this prized mallet dates much earlier than the tales, which are part of the Otogizōshi collection from the Muromachi Period. It can be traced at as far back as The Tale of Heike (ca. 1240), or, if the instance of use in the work has any historicity, datable to before ca. 1118.
In folkloristics, the uchide no kozuchi is catalogued in the Stith Thompson motif index scheme under ""magic hammer, D 1470.1.46".
In the legend, the one-inch tall Issun-Bōshi, after leaving his parent's home, comes under the employ of a wealthy daimyo, whose daughter is an attractive princess. Although scorned for his height, he is given the job of accompanying the princess. While traveling together, they are attacked by an Oni, who deals with pesky Issun-Bōshi by swallowing him. He defeats the Oni by pricking him from within with his needle/sword. The Oni spits out Issun-Bōshi and drops the 'Uchide-no-Kozuchi as he runs away. In the Otogizōshi, he then shakes out opulent riches with the mallet and becomes a court favorite. In the better-known modernized versions, the princess uses the power of the mallet to grow him to full size. At the end of the story, Issun-Bōshi and the princess are married.
The word uchi de no kozuchi literally translates to "striking-out [little] hammer," or "hammer that strikes anything out [that is desired]". In plainer speech it is understood that the hammer is to be shaken or swung.
According to the Hōbutsushū (1179), the mallet is a "wonderful treasure," such that when one goes out into a wide open field, it can be used to tap out a mansion, amusing men and women, useful servants, horse and cattle, food, and articles of clothing. However, all the items wished for reputed disappear at the sound of the bell tolling (hence the necessity of using it in a vacant field), and the moral of this Buddhist sermon-type tale (setsuwa) is that this is no treasure after all.
In The Tale of Heike is an anecdote whereby a strangely outfitted person moving about in the night, is mistaken for an ogre (oni), and his kindling wood mistaken for the uchide no kozuchi, attesting to the belief even then that this was a treasure reputedly owned by the ogres. The anecdote occurs in scroll 6 of Heike, under the chapter on Gion no nyōgo (Lady Gion). One night, near Gion Shrine, a figure is witnessed seemingly with hair like a bed of silver needles, and something glowing in his hand, which people feared to be an ogre, carrying the uchide no kozuchi for which these demon-kind beings are famous. The imperial guardsman Tadamori was ordered to investigate, and he discovered it was just a priest trying to illuminate a light in the chapel. The priest had put straws in his head to prevent getting damp. The same anecdote also occurs in the Genpei jōsuiki, which states that the priest was blowing on the embers in an earthenware container to keep it from going out, and when he did the straws on his head would illuminate and appear like silver needles. If this was a historical event, it happened sometime before or around the time when Kiyomori (born 1118) was conceived by the Lady Nyogo, who was then mistress to Retired Emperor Shirakawa, and Kiyomori's putative father Tadamori being the guardsman sent on the oni-hunt; but the tale is likely a "fable about Kiyomori's royal parentage."
It has been observed that the treasures of the oni in the later tale of Momotarō incorporated this older lore about treasures the ogres possessed. It has been observed that the same set of treasures as Momotarō's oni, or practically so, are described in The Tale of Hōgen, regarding Minamoto no Tametomo traveling to Onigashima island. Tametomo discovers that the islanders claimed to be descendants of oni, and named their now-lost treasures as the "cloak of invisibility, the hat of invisibility, floating shoes, sinking shoes, and sword" in some texts, and in older variant texts (Nakai codex group) one treasure is uchide no kutsu (shoes of wishing), a likely scribal error for uchide no kozuchi according to scholars.