When was the first vending machine invented?
What most people think: Most people think vending machines are a modern invention from the industrial age.
Guess before the Apple does
Just tell me the answer
The first known vending machine was described by Hero of Alexandria in the 1st century AD. It dispensed holy water when a coin dropped onto a lever inside.
You feed in a coin, a lever clicks, and out comes your drink. It feels like a very twentieth-century experience. But the basic trick was worked out by an engineer in Roman-era Egypt, and the drink was holy water.
The short answer
The earliest vending machine on record was designed by Hero of Alexandria, a Greek mathematician and engineer, in the 1st century AD. He described it in his treatise Pneumatica. Drop in a coin, and it released a measured amount of holy water.
The real story
Hero was a prolific inventor, also credited with an early steam device. His coin-operated dispenser solved a very practical problem. Worshippers used holy water for washing before entering temples, and according to classicist John Humphrey, people were taking more than they had paid for. Measuring every visitor’s portion by hand was slow and easy to cheat.
The mechanism was elegant. A coin went in through a slot at the top and landed on a small pan at the end of a lever, a bit like a balance beam. The coin’s weight tipped the lever, which pulled up a plug and let water flow out. As the lever tilted, the coin eventually slid off, a counterweight pushed the lever back, and the plug closed the flow. One coin, one portion. Hero’s own text gives the price as a coin of five drachms.
Here is the twist: the same basic idea, a coin’s weight triggering a mechanism, stayed in use in vending machines right up until they went electric. A design from roughly 2,000 years ago was, in principle, still doing the job in the modern era.
Later centuries produced their own versions. Taverns in seventeenth-century England had brass boxes that opened for a coin to sell tobacco, sometimes called honour boxes because customers could see everything and were trusted to take only their share. In 1822 an English bookseller used a vending machine to sell newspapers. The first modern commercial vending machine, selling postcards, came in 1883.
Why people get it wrong
We tend to file anything with coins, levers and automatic dispensing under the Industrial Revolution. Vending machines feel like a product of factories and railway stations, so the 1880s postcard machine is often treated as the starting point.
Ancient engineering also gets undersold. People picture the ancient world as all marble and togas, not clever automated gadgets. Hero’s writings are a reminder that ancient engineers understood levers, counterweights and fluid flow very well, and used them for surprisingly modern-feeling problems, like stopping people from pinching extra holy water.
“Two thousand years ago, someone built a coin machine because people kept nicking the holy water. Humans haven’t changed a bit.”
Sources
- The World's First Vending Machine Dispensed Holy Water - Mental Floss
- Ancient Rome's first vending machine - History UK
Fact-checked 31 Oct 2026. Spotted a mistake? Tell us and we'll fix it in public.
