A **vending machine** is an automatic machine that sells food or drink or other items.

An automated teller machine is a kind of vending machine, as are arcade games and bulk vending machines for toys or prizes, or anything that sells a physical item, service, or fun in exchange for money. Vending machine foods Archived 2022-12-20 at the Wayback Machine include snacks such as potato chips, chocolate bars, and candy. Hot vending machine drinks include coffee, tea, and hot chocolate. Cold vending machine drinks include juice, bottled water, and soft drinks. Other merchandise includes newspapers or cigarettes. Vending machines in bathrooms sometimes sell condoms, mouthwas Archived 2022-12-20 at the Wayback Machineh Archived 2022-12-20 at the Wayback Machine, or toothpaste and toothbrushes.

The machines usually work when some money (usually coins or paper money) is put in a slot. Then, a button needs to be pushed, or a lever pulled. If there is enough money, the selected item will be dropped to a tray, where it can be taken out by hand. Ticket vending machines will print the ticket. Older vending machines were all mechanical, but most newer ones are partly electronic. Many modern vending machines can accept debit or credit cards in addition to cash.

The first vending machine came about during 1st century AD in Roman Egypt and was invented by the Greek mathematician and engineer, Hero of Alexandria. It dispensed a certain amount of holy water, so people would not take much of it from the temple. People dropped tokens to release a certain amount of water.

In 1615, small machines that dispensed tobacco were placed in English taverns. In 1822, Richard Carlile, an English bookseller and publisher, created a machine that dispensed banned works, so allowing readers to purchase them. During the 1850s and 60s, the first, fully-automatic vending machine was introduced which sold stamps and writing paper. 

By the 1880s, coin-operated vending machines were introduced in London and Percival Everitt invented a machine that dispensed envelopes, postcards and notepapers. In 1887, Sweetmeat Automatic Delivery Company set up multiple vending machines in England, which sold chocolates, chewing gums, perfumes and matches. In 1888, the United States of America had its first vending machine, set up by the Thomas Adams Gum Company, which sold tutti-frutti gum. In 1907, one of the early models of the modern-day gumball dispensing machines came out. Through the 1940s and 1950s, soda-vending machines also became popular. Due to this, Coca-Cola immensely increased their sales and currently, has one of the largest number of vending machines in the world.

Japan has a reputation for having some of the most innovative uses of automated vending, providing machines that offer fresh fruits and vegetables, sake, hot foods, batteries, flowers, clothing and, of course, sushi. Japan has the highest per capita rate of vending machines in the world. 

* A vending machine selling crisps (potato chips), sweets and chocolateA vending machine selling crisps (potato chips), sweets and chocolate
* A cigarette vending machineA cigarette vending machine
* Vending machine selling train tickets in Ghent.Vending machine selling train tickets in Ghent.
* Vending machine for bicycle tubes in Berlin, GermanyVending machine for bicycle tubes in Berlin, Germany