Did vending machines exist in ancient times?
Apparently so. In the 1st century, Hero of Alexandria described a device that released water when a coin was inserted.
2.59 millionmachines
On train platforms, at mountain rest stops, tucked into the corners of office buildings. Live in Japan and it’s hard to picture a landscape without vending machines. Drop in a coin and you get what you want, no shop clerk required. Come to think of it, that’s a very clever arrangement.
We tend to think of machines that hand over goods in exchange for money as a modern invention. But the idea already existed in ancient Egypt.
Insert a coin, receive holy water
In the 1st century, an engineer named Hero lived in Alexandria, Egypt. He is known for devising all sorts of contraptions, from a sphere spun by steam to temple doors that opened by themselves.
In his book Pneumatica, Hero described a “sacrificial vessel which flows only when money is introduced.” Placed in a temple, it released water for purification when a worshipper dropped in a coin. According to the English translation, the coin was a five-drachma piece. The drachma was a unit of silver coinage used across the ancient Greek world. A visitor came to the temple, paid money, and received purifying water in return: a true “sales” system.
The mechanism was an ingenious use of a lever. Inside the vessel, a small pan sat on one end of a lever. When a coin dropped through the slot and landed on the pan, its weight tipped the lever, lifting a stopper connected to the other end and letting water flow out. Eventually the pan tilted far enough for the coin to slide off; the lever then returned to its original position, the stopper closed, and the water stopped. Powered by nothing but the weight of a coin, with no electricity or springs, it is sometimes called the world’s oldest vending machine.
Modern vending began with postcards
After that, coin-operated machines largely vanish from the historical record for a long time. There are records of brass boxes selling tobacco in English taverns in the 17th century, but vending machines didn’t really take off until the 19th century.
In 1883, Percival Everitt of England devised a coin-operated machine that sold postcards, envelopes, and notepaper. It spread to railway stations and post offices. In the United States, a chewing gum company installed gum vending machines on New York City train platforms in 1888.
Japan’s oldest vending machine came with a mailbox
Japan’s oldest surviving vending machine is the “automatic stamp and postcard vending machine” devised in 1904 by Tawaraya Takashichi, an inventor from Yamaguchi Prefecture. As the name says, it sold stamps and postcards.
On the right was an outlet for 3-sen stamps, on the left one for postcards at 1.5 sen, and at the bottom center a coin return and even a mailbox. It is also said to have had a mechanism to show a “sold out” sign when the stock ran out. However, it wasn’t quite reliable enough in operation and was never put into practical use.
Just how many does Japan have?
So how many vending machines are there in Japan today? According to the Japan Vending System Manufacturers Association, at the end of 2025 there were about 2.59 million vending machines, about 2.18 million of them selling drinks. Add “automated service machines” such as change machines, coin lockers, and automatic payment machines at parking lots, and the total reaches about 3.88 million.
Counting vending machines alone, that works out to roughly one for every 50 people in Japan. Public safety, which means machines left outdoors are rarely smashed or stolen, is often cited as one reason they’ve become so widespread.
That said, the numbers are slowly declining. At the end of 2014, there were about 5.04 million machines in total (part of the big drop in 2017 reflects a change in how the statistics were counted). Meanwhile, what’s on sale keeps diversifying: during the COVID-19 pandemic, for example, vending machines selling frozen food, which let people shop without face-to-face contact, multiplied.