Swimmers at a NSW north coast beach were forced to flee the water when a brown snake unexpectedly emerged from the surf at One Mile Beach.

Onlookers were expecting a shark when lifeguards blew warning whistles, but instead the 1.5-metre snake made its way to the shore from between the flags at the beach at Forster.

Cape Hawke Surf Lifesaving Club president Paul Scott said it was unusual for a brown snake to be at the beach.

"It's odd to see a snake which is a land-dwelling creature at the beach," he said.

"You see the odd sea snake in the water, but a brown snake is quite unusual. You see snakes around the beach but not in the water."

While beachgoers may have been shocked by the snake, it did not cause any harm, Mr Scott added.

"No lives were lost," he said. "No lives were in danger."

Mr Scott also said he was impressed that the snake knew where to swim.

"It was doing the right thing and swimming between the flags," he said.

The snake remained on the shore for a while before heading to some shade near the lifeguard trailer, and then to nearby bush at the southern end of the beach.

It later headed back towards the ocean.

Brown snakes are considered one of the world's most venomous snakes and are often found in sand dunes along the NSW coast.