"The Council judges that, with regard to the registration officer of a marriage, the legislator has not infringed their freedom of conscience," a statement said.
Interior Minister Manuel Valls sent out the circular in May when the Socialist government's gay marriage law was passed following a vocal campaign against it by Catholic and right-wing groups.
It pointed out that a refusal to carry out a marriage was an offence, punishable by a five-year prison term and a 7,500-euro fine, and also left mayors or other elected officials who refuse to comply liable to suspension from office or even revocation.
It did, however, say that another local councillor could be delegated to perform a civil wedding if the mayor and his deputy are absent or prevented from carrying out their duties.
The group that brought the appeal to the Constitutional Council claims to represent 20,000 councillors.
Before the ruling was announced it had already threatened to take the case to the European Court of Human Rights if the judgement did not go its way.