Meeting in Prague, where the current worlds are being staged, the IIHF awarded the 2019 championships to the Slovakian cities of Bratislava and
Kosice, to be held from May 3rd-19th.
Slovakia, an independent state since 1993, has already hosted the championships in 2011.
Switzerland will hold the following year's tournament in Zurich and Lausanne, the IIHF announced.
The country last held the event in 2009, in Berne and Zurich-Kloten.
For 2020, Switzerland plans to host the championships under the slogan “Love Ice Hockey”.
The two venues include Zurich's Hallenstadion, a heritage building originally built in 1939 and reopened in 2005 after the interior was completely rebuilt.
It offers 11,200 seats for hockey, a nearby practice rink and is the home of the ZSC Lions Zurich.
A brand-new venue in Lausanne is planned as the second facility.
The 10,000-seat arena is planned also for the 2020 Winter Youth Olympic Games bid and will include a practice rink located alongside it.
If the proposed Lausanne venue is not built, the 7,000-seat arena in Zug that recently hosted the U18 World Championship was named as backup venue.
Next year's hockey competition will be held in Russia, while France and Germany will stage the 2017 championships and Denmark will be the host nation in 2018.
The announcement about Switzerland's hosting of the championship in 2020 came a day after Swiss hopes of advancing beyond the quarterfinals in this year's tournament were crushed on Thursday.
They were eliminated from competition following a 1-3 loss to the US in a knock-out game at the Ostrava arena.
Switzerland notched the first goal in the 14th minute of play and were able to maintain a 1-0 lead until the 31st minute when the Americans equalized.
Less than a minute later the US took the lead before scoring an insurance goal in the third period.
The US now goes to the semifinals against Russia, while Canada will square off against the Czech Republic for the right to compete in the finals.