Hamelin (German: Hameln) is a town in Lower Saxony, Germany. It is the capital of the district of Hamelin-Pyrmont. The Weser river runs through the town. Population: 58,800 (1999).

The town is famous for the folk tale of the Pied Piper of Hamelin. The version written down by the Brothers Grimm made it extremely popular throughout the world. Although Hamelin has a fine medieval old town with some remarkable buildings, the main attraction is the Pied Piper tale. In the summer every sunday the tale is played by actors on the authentic places.

There was a monastery at the place, which was founded as early as 851. A village grew in the neighbourhood and became a town in the 12th century. The incident with the Pied Piper is said to have happened in 1284 and may base on a true event somewhat different from the tale. In the 15th and 16th century Hamelin was a minor member of the Hanseatic League. The era of greatest wealth began in 1664, when Hamelin became a fortified border town of the principality of Hanover. In 1867 the town became a part of Prussia.

Hamelin is also a gate to the surrounding Weserbergland mountains, which can be visited by hikers and bikers.