The ruling comes after a lengthy court case brought about in 2013 by musician Rupa Marya and filmmaker Robert Siegel against music publishing company, Warner Chappell Music, a division of media giant Warner Music Group.

Judge George H King ruled that the company owned the copyright to a specific piano arrangement of the song, rather than the song itself known today.

On Tuesday, a U.S. district judge in Los Angeles ruled that "Happy Birthday to You" belongs in the public domain, dealing a blow to the music publishing company that has made millions of dollars in royalties from the song.

You can now sing "Happy Birthday" without risking a lawsuit after a U.S. federal judge has thrown out a copyright claim to one of the most lucrative and recognized songs in the western world.

They launched after it had asked them for $1,500 (£970) for the right to use "Happy Birthday To You" in a documentary they were making about the song.

But they argued that the song was in the public domain and said that Warner/Chappell Music had been "wrongfully asserting copyright ownership in the Happy Birthday lyrics."

Read More 'Goodfellas' actor sues 'The Simpsons'



Marya and Siegel claimed that the music publisher had thus been charging "millions of dollars of unlawful licensing fees." Warner/Chappell music is reported to have earned around $2 million a year from royalties from the song whenever it was broadcast – technically, anyone singing "Happy Birthday" in public owed royalties.

Warner/Chappell music argued that it had acquired a company in 1988 that owned the original copyright to the song. However, Judge King ruled that that company had never owned the rights to the lyrics and the original copyright -- filed in 1935 by the Clayton F Summy Company -- applied to a specific musical arrangement of the song rather than its lyrics.

The song is believed to have been written by two sisters, Mildred and Patty Hill, in 1893. Alhtough they knew Clayton F Summy, the judge found no evidence they had given him any rights to the lyrics, however.

"The Hill sisters gave Summy Co the rights to the melody, and the rights to piano arrangements based on the melody, but never any rights to the lyrics," Judge King said.

After the ruling, a spokesman for Warner/Chappell said "We are looking at the court's lengthy opinion and considering our options." The attorney for the plaintiffs, Randall Newman, said that "Happy Birthday' is finally free after 80 years," the LA Times reported.