A young humpback whale has been freed after becoming entangled in shark netting off the coast of Sydney's northern beaches in New South Wales.

The rescue operation was carried out by a team from the New South Wales Police and Department of Primary Industries.