They ruled unanimously on one element and 6-3 on another, with liberals and conservatives on either side.
The justices ruled in favor of a company called "FUCT" whose trademark was earlier found to have violated the provision.
The court found that the statute can't stand because it "disfavors certain ideas."
Justices Elena Kagan, Clarence Thomas, Ruth Bader Ginsburg, Samuel Alito and Neil Gorsuch ruled in the majority.
Chief Justice John Roberts, alongside Justices Stephen Breyer and Sonia Sotomayor, partially dissented.
All so the first "FUCT" can sue all the other FUCTS! This ruling follows a similar one a couple of years ago, allowing an Asian band named "The Slants" to register their trademark after the USPTO told them to get fuct.