Police found $20,000 of cannabis, ice and ecstasy when they stopped a car on the Hume Highway, they say.

NSW police said officers from Goulburn Highway Patrol stopped a Toyota Corolla on the Hume Highway about 12.20am Tuesday.

They said they found the drugs, which they estimated had  an estimated potential street value of $20,000, when they searched the car.

"Two men, aged 22 and 26, were arrested and taken to Goulburn Police Station, where they were charged with three counts of supply prohibited drug and three counts of possess prohibited drug," they said in a statement.

They were taken to Goulburn Local Court and were expected to appear again on Wednesday.