The Planned Parenthood Federation of America said the requirement to promote an anti-prostitution message forced healthcare groups to denounce the people it's most important to reach.
"Today’s decision will ensure that crucial information and access to health care services for people in need is provided by organizations and individuals committed to these principles, not just by those who meet a government viewpoint litmus test," Planned Parenthood President Cecile Richards said in a statement.
The Supreme Court said the government cannot force private organizations to express a certain viewpoint.
The government doesn't have to fund organizations that want to directly contradict its position, the court said, but requiring them to promote a government-approved message violates the First Amendment.
The AIDS Healthcare Foundation also praised the court's decision.
“Kudos to the Supreme Court for overturning this counterproductive law that required AIDS and health groups to take an anti-prostitution pledge as a condition of receiving AIDS funding to provide potentially lifesaving care and services to needy and deserving populations,” foundation President Michael Weinstein said in a statement.