The approval for the extension of a coalmine that could have contaminated Sydney's water supply has been overturned.

Environmentalists fought the decision to add about 13 years to the life of Springvale colliery's underground operations by expanding them.

After several years, the NSW Court of Appeal has now ruled in their favour.

The expansion, near heritage-listed swamps in the Blue Mountains National Park, could have polluted water entering catchments that feed into Sydney's water supply.

Warwick Pearce, spokesperson for conservation group ‘4nature’, says it is a big win.

“It's very good for people in Sydney because it's protecting drinking water and protecting the national park,” he told the ABC.

“There was an enormous amount of mine wastewater going into the Cox's River and hopefully that will be reduced or stopped all together.”