The ruling came in a case involving several Czech families whose children had been refused admission to school because they had not been fully vaccinated against a panel of diseases.
Compulsory vaccinations for children are "necessary in a democratic society", the European Court of Human Rights (ECHR) said in a ruling on Thursday.
It came in a case involving several families from the Czech Republic whose children had been refused admission to school because they had not been fully vaccinated against a panel of nine diseases including poliomyelitis, hepatitis B, tetanus, measles, mumps, rubella, diphtheria, whooping cough and pneumococcal infections.
Nicolas Hervieu, a legal expert specialising in ECHR matters, said the ruling "reinforces the possibility of compulsory vaccination" for COVID-19.
Sixteen of the 17 judges rejected the families' argument that the compulsory vaccination law went against their right to respect for private life.
They concluded "the measures could be regarded as being necessary in a democratic society" and that the government has not "exceeded their wide margin of appreciation in this area".
"The objective had to be to protect every child against serious diseases. In the great majority of cases, this was achieved by children receiving the full schedule of vaccinations during their early years. Those to whom such treatment could not be administered were indirectly protected against contagious diseases as long as the requisite level of vaccination coverage was maintained in their community; in other words, their protection came from herd immunity," they wrote.
Anti-vaccine campaigns disseminated on social media have led to growing distrust in routine jabs in recent years. This has been accompanied by a surge in outbreaks.
More than 100,000 cases of measles were recorded in the World Health Organisation's European region between January and October 2019, exceeding the 83,540 cases reported in 2018 and more than three times the amount observed in 2017.