Visby [ˈviːsbʏ] is a locality and the seat of Gotland Municipality in Gotland County, on the island of Gotland, Sweden with 24,330 inhabitants, as of 2017. Visby is also the episcopal see for the Diocese of Visby. The Hanseatic city of Visby is arguably the best-preserved medieval city in Scandinavia and since 1995, it has been on the UNESCO World Heritage site list. Among the most notable historical remains are the 3.4 km (2.1 mi) long town wall that encircles the town center, and a number of church ruins.
Visby is a popular vacation destination for Scandinavians during the summer and receives thousands of tourists every year. It is by far the most populated locality outside the Swedish mainland. The Gotland University is in Visby, and since 1 July 2013, it is a department of Uppsala University under the name Uppsala University–Campus Gotland. Visby is also the sole county seat in Sweden only accessible by boat and air.