Four men have been arrested after more than two kilograms of cocaine with a street value of $1 million was allegedly been found hidden in a car on Sydney's northern beaches.

Officers arrested a 35-year-old Ryde man in Queenscliff on Monday after searching his Honda Jazz.

They allegedly found 50 grams of cocaine on him and 2.5 kilograms in five shopping bags hidden in a secret compartment of the car.

He was charged with large commercial drug supply and appeared at Manly Local Court on Tuesday.