Visby is linked to the mainland of Sweden by ferry and by plane.
Ferries arrive from both Oskarshamn in Småland and Nynäshamn, near Stockholm, each taking about three hours.
The ferries are run by Destination Gotland and subsidized by the Swedish government.
Destination Gotland is the only ferry operator – in summer 2016, independent shipping company Gotlandsbåten ran ferries to Västervik and Nynäshamn, but this service was unprofitable and was not repeated in 2017.

Visby Airport is located about 5 km (3.1 mi) north of the city and offers connections to the Swedish mainland.
With 467,857 passengers in 2018, it is the 9th largest airport in Sweden.
Daily flights to Stockholm Arlanda Airport is a common way to reach or depart from the island.

There are also city buses in Visby as well as buses to other parts of Gotland.

Visby gave its name to the 1968 Visby Amendments, which were an amendment of the Hague Rules of shipping law, leading to the Hague–Visby Rules.

Visby was previously served by two railway lines, the Gotland Railway which ran from Lärbro in the north, to Burgsvik in the south, via Visby harbour and the Visby–Visborgsslätt–Bjärs Railway, south to Visborgsslätt and Västerhejde.
The first line, from Visby to Hemse was started in 1878, under the auspices of the Gotland Railway.
Passenger transport was discontinued in September 1960.
Freight traffic on the Slakteriet – Visby port route ran until May 1962.
The last sections of the port track in Visby were removed in March 1964.
Visby railway station, just south of the Söderport on Söderväg, was completed in 1878 and is one of the few remaining vestiges of the railway in Visby.
Visby is linked to the mainland of Sweden by ferry and by plane. Ferries arrive from both Oskarshamn in Småland and Nynäshamn, near Stockholm, each taking about three hours. The ferries are run by Destination Gotland and subsidized by the Swedish government. Destination Gotland is the only ferry operator – in summer 2016, independent shipping company Gotlandsbåten ran ferries to Västervik and Nynäshamn, but this service was unprofitable and was not repeated in 2017.
Visby Airport is located about 5 km (3.1 mi) north of the city and offers connections to the Swedish mainland. With 467,857 passengers in 2018, it is the 9th largest airport in Sweden. Daily flights to Stockholm Arlanda Airport is a common way to reach or depart from the island.
There are also city buses in Visby as well as buses to other parts of Gotland.
Visby gave its name to the 1968 Visby Amendments, which were an amendment of the Hague Rules of shipping law, leading to the Hague–Visby Rules.
Visby was previously served by two railway lines, the Gotland Railway which ran from Lärbro in the north, to Burgsvik in the south, via Visby harbour and the Visby–Visborgsslätt–Bjärs Railway, south to Visborgsslätt and Västerhejde. The first line, from Visby to Hemse was started in 1878, under the auspices of the Gotland Railway. Passenger transport was discontinued in September 1960. Freight traffic on the Slakteriet – Visby port route ran until May 1962. The last sections of the port track in Visby were removed in March 1964. Visby railway station, just south of the Söderport on Söderväg, was completed in 1878 and is one of the few remaining vestiges of the railway in Visby.
Visby