The festival, located in the town of Skanderborg, announced the appearance of the US megastar on its website and social media on Friday, describing the singer as a “living pop legend”.
Spears, 36, achieved worldwide stardom in the late 1990s and early 2000s with hits such as Baby One More Time, Oops! I Did It Again and Toxic.
The concert will be her first at a Danish festival.
Danish acts including MØ, D-A-D, Saveus, Nephew and C.V. Jørgensen will also play at Smukfest, which takes place from the 8th-12th August next year.
Tickets for the full festival sold out within an hour and half of going on sale earlier this month – notably faster than last year, when the festival sold out in five hours.
After a career hiatus following highly-publicised personal problems in the mid-2000s, Spears has released three albums since 2011 and has appeared as a judge on the US version of popular television series The X Factor since 2012.
READ ALSO: Britney, and her undies, coming to Denmark