Police said the group, including eight teenagers and four adults, from the Oldham area, were trapped in Lower Long Church cave in the Ingleton area.
The group were led out of the cave as water levels dipped after an ordeal lasting several hours.
Concerned family members had been waiting for news of the group.
A statement from North Yorkshire Police said: "The group had to remain in the cave until the water levels dropped off sufficiently for members of the Cave Rescue Organisation to enter and bring them to safety.
"Precautionary medical checks were carried out by paramedics and all those involved were declared fit and well.
"With assistance from North Yorkshire County Council, a respite centre was set up at Settle College where concerned family members gathered as they waited for the water levels to reduce before the rescue effort could be carried out."