The melody and lyrics were written by two sisters - Mildred J. Hill (born 1859) and Patty Smith Hill (born 1868). Patty was a schoolteacher who developed the "Patty Hill blocks" and was a faculty member at Columbia University Teachers College. Mildred was also an educator who later on became a composer, organist and pianist. The melody was composed by Mildred and the lyrics were written by Patty, but it was originally for a classroom greeting song titled "Good Morning to All." The song "Good Morning to All" was part of the book Song Stories for the Kindergarten which the sisters co-wrote and published in 1893.
From then on the lyrics were changed from its original form to "Good Morning to You" and then to "Happy Birthday to You." It is still unclear who changed the lyrics that turned it into a birthday song, but it was first published in 1924 on a book edited by Robert H. Coleman. Since then, the song became popular and in 1934, Jessica Hill, another Hill sister, filed a lawsuit because of the unauthorized use of the "Happy Birthday to You" melody which clearly resembles the melody of "Good Morning to All," the song her sisters originally wrote. In 1935, Jessica, who was working with publisher Clayton F. Summy Company, copyrighted and published "Happy Birthday."
In the 1930s the Clayton F. Summy Company was bought by John F. Sengstack and renamed it Birch Tree Ltd. In 1998, Birch Tree Ltd was in turn bought by Warner Chappell for $25 million. The company is now known as Summy-Birchard Music. It is reported that the birthday song brings in about $2 million a year in royalties with half going to Summy-Birchard and the other half to the Hill Foundation.