"Cake by the Ocean" is the debut single by American band DNCE. It was released through Republic Records as the lead single from their debut extended play, Swaay, on September 18, 2015, with the song being released on the EP a month later on October 23. It was also included on their self-titled debut studio album, which was released on November 18, 2016. The song was produced by Mattman & Robin and was written by the duo alongside group member Joe Jonas and Justin Tranter, the latter of whom previously being a member of Semi Precious Weapons with another member of DNCE, Cole Whittle.