The case was brought by two female British citizens whose husbands, from Yemen and Pakistan, want to come to the UK to be with their families.
However, under the UK's spouse visa rules for nationals outside the European Union, the men must learn a basic level of English and pass a test at an approved centre before being allowed to enter the country.
Saiqa Bibi and Saffana Ali claimed their husbands would not be able to pass a test before coming to the UK and argued that the men would have to learn computer skills and travel long distances to take their English tests, making it unfeasible.
A panel of five judges were asked to rule whether the pre-entry measure was "unreasonable, disproportionate and discriminatory".
They unanimouslydismissed the appeal but indicated that the way the scheme operated might be unlawful and asked the women's lawyers to present further arguments.
They also suggested that exemptions may be made in cases where it was impractical to apply the rule.
The Supreme Court judgement follows earlier rulings in the High Court and Court of Appeal that there was no disproportionate interference with family life.
The visa entitles the spouse to enter the UK for a limited probationary period.
After that period is over, the spouse can then apply for indefinite leave to remain if the requirements of the immigration rules are satisfied.
Where an applicant for a spouse visa does not satisfy the pre-entry language requirement, the entry clearance officer will automatically consider the issue of whether there may be exceptional circumstances that warrant the grant of entry clearance outside the immigration rules on grounds of Article 8 "because refusal would result in unjustifiably harsh consequences for the applicant or their family".
He argued that the pre-entry language requirement did not violate Article 8.
