Beginning with animation and documentaries (2006–2013)
In his late teens or early twenties, Sandberg began working at Film i Jönköping, a local film center in Jönköping, initially as an intern. He learned more about filmmaking from Svante Rosberg, the film commissioner who ran Film i Jönköping when he started, and whom Sandberg considers his mentor. Starting in 2006, Sandberg found moderate online success making animated short films; according to Sandberg, his first online successes were his films För Barnen and Vad Tyst Det Blev, the latter of which garnered 1.7 million views on YouTube. As a result of his increased visibility, he began to receive offers for animation work; his first job was working as a consultant on the TV show on the Swedish Channel 5. He continued working at Film i Jönköping, primarily working on documentary projects. From 2006 to 2009, he worked on several documentaries for, the Swedish Inheritance Fund. His last collaboration with Rosberg before his retirement was Animera = Göra Livlig, a 2010 documentary about senior citizens creating animated films. In 2009, he moved to the city of Gothenburg. He continued working on animation and documentaries, and began collaborating with producer Claes Lundin. In 2011, they completed and sold an animated documentary series called Earth Savers, and in 2013, their documentary short Ladyboy premiered at Cinequest Film Festival.
In 2013, he began to shift his focus away from animation and documentary works and towards horror short films. According to Sandberg, his original goal with filmmaking had been to make horror and sci-fi films, and he felt he needed to have some existing work in that field in order to get funding for future work. Lacking any funding of his own, his shorts were made with no budget—his equipment and props consisted mostly of items he already had or could buy very cheaply, and his only cast and crew were himself and Lotta Losten, his wife. He released his films on both Vimeo and YouTube, using his alias ponysmasher. In 2013, he released his second horror short, Lights Out, which centered around a monster that only exists when the lights are turned out. The film was a viral success, and quickly garnered millions of views. According to Sandberg, his life changed "in every way imaginable" after Lights Out; he began receiving tons of messages from film industry people who wanted to work with him. One of these contacts was Lawrence Grey, a producer who wanted to adapt Lights Out into a feature-length film. Grey brought screenwriter Eric Heisserer and producer James Wan on board to collaborate and produce a script with Sandberg, who would also direct the new feature. The film began production in mid-2015, and premiered at LA Film Festival in June 2016. The film was a massive box office success, grossing $148 million on a $5 million budget, and a moderate critical success, earning a 76% approval score on Rotten Tomatoes and a 58 out of 100 score on Metacritic. Sandberg next directed , a prequel to supernatural horror filmAnnabelle and the fourth film in The Conjuring Universe. The film was released in 2017 to positive reviews and box office success. In 2019, Sandberg directed the DC Extended Universesuperhero filmShazam!, based on the DC Comicscharacter of the same name. The film received positive reviews.
Sandberg married actress, designer, and photographer Lotta Losten in 2013. She has featured in many of his short films, including Lights Out. Sandberg and Losten moved to Los Angeles together circa 2015. Sandberg's younger brother is Joakim Sandberg, creator of the Iconoclastsvideo game.