"Cake by the Ocean" was co-written by Joe Jonas, Justin Tranter, and Swedish duo Mattman & Robin, who also produced the song.
[4] The song's title originated from Mattman & Robin's repeatedly confusing the phrase "sex on the beach" for "cake by the ocean".
[5][6] "Cake by the Ocean" is composed in the key of E minor and has a tempo of 119 beats per minute, with DNCE's vocals ranging from E3 to D5.
[8][9] "Cake by the Ocean" was released through Republic Records as the lead single from their debut extended play, Swaay, on September 18, 2015.
[12] They performed a 1950s rock-inspired version of "Cake by the Ocean" for their cameo in Grease: Live as Johnny Casino and the Gamblers.
[18] It features product placement scenes by the dating app Bumble, including a shot of a hand swiping through photos of women and a Bumble-branded towel being waved.
"[22] Issy Sampson of The Guardian called the song a "frothy pop dream" and praised the "easy-to-chant chorus, only with the added thrill of hearing a former Disney star swear and make references to 'eating cake by the ocean'.
[26][27] The Recording Industry Association of America (RIAA) certified the single 5× Platinum, which denotes five million units based on sales and track-equivalent on-demand streams.
[52] The song is featured in the films Pitch Perfect 3, Bad Moms, Middle School: The Worst Years of My Life, Malibu Rescue, The King of Staten Island, Sing 2, and in trailers for Mike and Dave Need Wedding Dates,[53] Hotel Transylvania 3: Summer Vacation[54] and The Lost City.
[55] It has also been featured in the television series Telenovela, South Park, No Tomorrow, The Real O'Neals, The Challenge XXX: Dirty 30, Mary + Jane and The Wilds, and My Life with the Walter Boys, and appeared in an Indonesian Mizone commercial in August 2016.