It followed a June vote by the lower chamber to back an exit from nuclear energy recommended by the government, which had earlier frozen plans for a new construction programme after the Fukushima atomic plant explosion.
Bern said it would count on the development of its already considerable hydro-electric plants and other renewable energy to make up for the loss of nuclear power, while not ruling out importing electricity.
If necessary the country could also fall back on electricity produced by fossil fuels, a statement added, while still respecting targets set under Switzerland's climate change policy.
Under the government's recommendation, the first nuclear plant to be shut down would be Beznau I in 2019, followed by Beznau II and Muehleberg in 2022, Gösgen in 2029 and Leibstadt in 2034.
The government predicted that such a programmed phasing out nuclear energy would favour businesses involved in green technology, boost employment and help Switzerland deal with expected rising electricity prices in Europe.
Initial calculations estimate that the cost of reshaping the country's energy resources, offset by measures to cut consumption, would cost the country between 0.4 percent and 0.7 percent of gross domestic product per year.
Environment and Energy Minister Doris Leuthard also noted that nuclear energy was anyway becoming more expensive, due to the rising cost of making plants safer and more secure.
However, the move to halt atomic energy was opposed by the federation of Swiss businesses EconomieSuisse, which had slammed it as an "irresponsible decision."
The association of Swiss electricity companies applauded the decision for a progressive end to nuclear energy, rather than an immediate stop.
"The continuation of these plants gives us time to find solutions amid a shortage as well as implement more efficient measures," it said.
However, the association stressed that the population must be given a say in the decision.
Environmental group Green Cross International's president Mikhail Gorbachev meanwhile welcomed Switzerland's decision.
"I applaud Switzerland for taking this brave step towards ending its reliance on nuclear energy," he said in a statement.
"The ghastly memories of Chernobyl and now Fukushima are too fresh and vivid to allow us to ponder any other alternative than ending our reliance on nuclear energy," added the former Russian president.
Besides Switzerland, Germany has also opted to shut down all of its nuclear reactors by the end of 2022 after the Fukushima plant was wrecked by a tsunami sparked by a devastating earthquake.