Two divers, accompanied by a doctor, reached the amateur spelunkers after they were contacted about 325 feet from the entrance to the narrow, winding cave, where high water made for a harrowing search.
"They are alive. They are safe and sound," Bernard Fraudin, deputy governor of the Montbeliard region, said on French television.
Hot drinks and food were brought into the cave for the five men and three woman, all in their 20s and 30s.
Fraudin told LCI television that a portion of the cave, flooded by days of rain, was to be dried to create a passage to evacuate the eight. He said the evacuation was expected to take several hours.
The group was found after a setback in the large rescue operation that included more than 100 people from France and Switzerland.
After digging a hole overnight in the top of the cave known as the Bief-du-Paraud, rescue workers managed to reach one of two cavities known to contain an air pocket - but found it empty.
They had entered the cave about 30 miles from the Swiss border on Wednesday and were trapped by torrents of water that flushed through its long passage after heavy rain.
The cave is not deep but wends its way nearly a quarter of a mile. It is considered an ideal cave for beginning spelunkers, but was filled with water after heavy rain.
Swiss and French rescue workers, divers and civil defense personnel were called to the site and began arriving late Wednesday. Experts crowded around the mouth of the cavern near a waterfall in a verdant forest.
Using pumps, rescuers managed to lower the water level by nearly 30 inches Thursday morning, but heavy rain pushed it back up during the day and more rain overnight threatened to send it higher.
Divers were unable to get into the cave until late Thursday, after rescuers used explosives to widen its entrance. Rescuers worked through the night to contact the group, with fresh rain complicated the task.
Seven of the vacationers are students at the Haute Ecole de Travail Social, a social-work college in Zurich, and one is a teacher. Television reports said they took the cave tour to help develop their ability to face challenges in their careers.
The students were one of two groups on a tour organized by Altamira, a travel agency in Bettingen, Switzerland.
"I'm so happy this nightmare is over," said Markus Braendle, the director of the school, which sent two teachers to the cave site.
(c) MMI The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed