The NSW government has banned offshore mining and exploration for petroleum, coal and other resources in waters off the state's coastline.
Deputy Premier Paul Toole announced the policy on Wednesday, formalising the coalition government's long-held plan not to support such commercial activities.
But sand mining for the purposes of preventing coastal erosion and restoring sand to beaches will continue "where a clear public benefit exists".
Mr Toole said the policy would protect the offshore environment for future generations.
"NSW has some of the world's most spectacular coastlines, which support local industries and make them a great place to live, and we want that to continue," he said.
While offshore activities are off-limits, the government continues to support onshore mining.
The government has already provided certainty to the coal sector and delivered a strategy to grow the local critical minerals and advanced manufacturing sectors, Mr Toole said.
It also had a "clear vision" for onshore gas exploration and production, he added.