The Swede has created mega-hits for acts from Britney Spears to Ed Sheeran - and now a new musical is putting his genius in the spotlight. Nick Levine asks what makes his songs fly.

Even if you don’t recognise the name Max Martin, you’ll definitely know his music. Since breaking through in the late Nineties, the Swedish songwriter-producer has co-written 22 Billboard Hot 100 number one hits – more than anyone, bar John Lennon and Paul McCartney. The 48-year-old’s incomparable catalogue spans 90s teen-pop classics (Britney Spears’ ...Baby One More Time, Backstreet Boys’ I Want It That Way), 00s pop-rock bangers (Kelly Clarkson’s Since U Been Gone, P!nk’s So What) and sleek neo-disco tracks from this decade (The Weeknd’s Can’t Feel My Face, Justin Timberlake’s Can’t Stop the Feeling!). When Taylor Swift was making her first proper pop album, 2014’s 1989, after starting her career as a country artist, she recruited Martin as her main collaborator. 

More like this

- Who was the real Freddie Mercury?

- The hardest place to be a popstar

- History’s most enduring tune

The private and rather enigmatic man, whose real name is Karl Martin Sandberg, hasn’t shown any signs of slowing down. Last year he co-wrote Ariana Grande’s UK garage-influenced hit No Tears Left to Cry; this year he’s co-written two ubiquitous bops by Ed Sheeran, I Don’t Care (a duet with Justin Bieber) and Beautiful People (which features Khalid). Martin has become such a one-man hit factory over the past two-and-a-half decades that 30 of his songs have now been baked into a new jukebox musical officially opening in London’s West End tonight. Titled & Juliet, it imagines what might have happened next if the heroine hadn't killed herself at the end of Shakespeare’s Romeo and Juliet. 

Bill Sherman, & Juliet’s music supervisor, orchestrator and arranger, tells BBC Culture that collaborating with Martin has been “a daily masterclass in how to write and construct pop songs”. Sherman likens the Swede, who rarely gives interviews and maintains a low public profile, to “the Yoda of pop songwriting”. Together, they’ve “taken Max’s songs apart and put them back together again”, which Sherman concedes is a “strange concept” given how “perfect” the original versions remain. The results are sometimes audacious: ...Baby One More Time has been reimagined as a power ballad, while Can’t Feel My Face is performed as a mash-up with Ariana Grande’s Problem.

A master of hooks

Sherman has spent a considerable amount of time analysing and reconstructing Martin's songs for & Juliet, but says it’s impossible to offer a “convenient one-liner” for what makes them so brilliant. “My day job is musical director on Sesame Street, and what makes a song great for kids is a lot of repetition and what I like to call ‘earworms’ – hooks, things that reel people in,” Sherman says. “It's almost the same thing with Max Martin songs. The verse is a hook, then the chorus is another hook. He's always talking about melody and striving to find that thing that makes it magical.” Sherman says that though Martin sometimes gives off the impression that his songwriting is “some kind of mathematical process”, the thing he says most is: “It just doesn't feel right.”

“He goes a lot on the feel of a song, which seems very subjective to me,” Sherman adds. “But he's been going on his gut for 25 years, and it's hard to argue with his track record.”

At the same time, we know that Martin likes to adhere to certain self-prescribed songwriting rules. New Zealand singer-songwriter Lorde revealed in 2017 that Martin had described her 2012 breakthrough hit Royals as an example of “incorrect” songwriting. “He was basically like, ‘The pre-chorus should be the chorus. That’s the catchiest part of the song,’” she recalled.

His early stuff is like Abba – you can just tell it's his melody and vocal arrangement. He’s like an artist in his own right – Anders B

So, even if the Martin hit-making approach is not quite a formula, what are some of the secrets of his success? Sherman observes that Martin’s songs “tend to get bigger as they go on”, beginning with “a first verse and chorus that are a little smaller” before a crescendo. He says this makes them especially well-suited to musical theatre “because in this setting, you always want a song that has somewhere to go, and a lot of his songs just do that naturally”.

Anders B of Danish pop group Alphabeat, who hails Martin's music as a major inspiration, says his “early stuff is like Abba – you can just tell it's his melody and vocal arrangement. He’s like an artist in his own right.” Anders B points out that Martin’s early songs tend to have “these big orchestral swells” in their production – it's literally larger than life, like the [title of the] Backstreet Boys song [which he co-wrote]”. He also believes there’s a certain contradictory quality to classic Martin songs like ...Baby One More Time. “It's super-bright and super-pop, but also has these minor chords, so there's a sense of tension in it.”

Swedish singer-songwriter Sophia Somajo, who records as Soso and has co-written hits for Britney Spears and Christina Aguilera with Martin, says he has always stood out from the crowd because he has different influences to many of his peers – among them rock music. “A lot of songwriters and producers listen to the music of now and try to mimic it or make a version of it,” she says. “But his influences are random. Like, if you would take the riff out of a P!nk or an NSync song, it's like a Black Sabbath riff.” Somajo says that today's songwriters “know now that if you play a hard rock riff on a synth, it sounds like current pop music”, but points out: “That's only because Martin did it first.”

This use of rock riffs-as-pop hooks that he pioneered makes sense when you consider his roots. Before he started to focus on writing for other artists in the early Nineties, Martin was the lead singer of a Swedish glam-metal band called It’s Alive. They only released one album, which wasn't a hit, but Swedish songwriter-producer Denniz Pop spotted Martin’s talent and encouraged him to hone his craft at Cheiron Studios in Stockholm. “I didn't even know what a producer did, I spent two years – day and night – in that studio trying to learn what the hell was going on,” Martin admitted in a 2001 interview.

Songs from the Britney and Backstreet Boys era are very complex harmonically - but as time's gone on, his style has become a lot simpler - Bill Sherman

By the late Nineties, Martin had transformed himself into a pop songwriting maestro, crafting hits with his distinctive bombastic style for Britney Spears, Backstreet Boys, NSync, Robyn and British boyband Five. The euphoric intro of Spears’ 2000 hit Stronger is an archetypal example of Martin’s ability to grab your attention with thumping production which perfectly complements the singer’s gutsy vibrato vocal hook. But since the mid-to-late-00s, when he minted a slick pop-rock sound featuring more prominent guitars alongside Lukasz “Dr Luke” Gottwald, the songwriter-producer who has since been accused of sexual assault and abuse by Kesha, it’s arguable that Martin’s songs have become less sonically distinctive. Recent Martin co-writes such as Ellie Goulding’s Love You Like I Do, Adele’s Send My Love (to Your New Lover) and Ariana Grande’s Side to Side show off his familiar melodic brilliance, but don’t stick to any particular sound or production style.

He has this incredible social intelligence which means he can talk to anyone on their level and be very truthful and real - Sophia Somajo

“Songs from the Britney and Backstreet Boys era are very complex harmonically – there’s a lot of chords going on,” notes Sherman. “But as time's gone on, his style has become a lot simpler.” This is no discredit to Martin: really, it reflects the fact that, nearly uniquely among professional songwriters, he has been able to move with the times and remain the “go-to guy” for successive generations of pop star. The UK's Stock Aitken Waterman songwriting-production trio became known as “the hit factory” after crafting a succession of late-80s hits for Kylie Minogue, Rick Astley and Bananarama, but only enjoyed around seven or eight years of chart dominance. Martin is still going strong nearly a quarter-century after his first hit.

Why he’s endured

Adaptability aside, though, what’s the key to his longevity? Sherman says that when he first met Martin, he was “transfixed by how humble he was”. “He's super-collaborative, it's all about what the best idea is," Sherman adds. “When you walk into a room with someone who's had that much success, you think he's going to be a tyrant, but Max is exactly the opposite.”

Somajo agrees, saying that Martin has a unique and deep-rooted gift for connecting with fellow songwriters and musicians. “He has this incredible social intelligence which means he can talk to anyone on their level and be very truthful and real,” she explains. “I think the recipe for his success is a combination of being such a brilliant musical person and such a decent, intelligent person who can draw stuff out of you. He’s almost like a shrink!” She points out that Martin has fostered the kind of long-term working relationships that are rare in a notoriously fickle industry. Twelve years after Martin co-wrote her first hit ...Baby One More Time, Britney Spears trusted him to executive produce her 2011 album Femme Fatale. 

Somajo also suggests that Martin remains fresh because he’s always “bringing in new young talent and mentoring and teaching them”. She cites the success of Karl Johan Schuster, a Martin protégé who’s now a Grammy-winning songwriter-producer called Shellback: he’s co-written countless hits with Martin, and several others, including Maroon 5’s Moves Like Jagger, without him. “When I first went into the studio with [Max] Martin, this other dude was there – this weird, long-haired kid that everyone knows nowadays as Shellback,” Somajo recalls. “He was so young and brilliant and could play every instrument, and he talked non-stop. I was like, ‘Is this some kind of savant wunderkind that Martin's found somewhere?’” Samajo says Martin has a knack for spotting something “interesting” in people, even if they're not the best songwriters on a technical level. “He saw something in me, and it really changed my life,” she adds.

At this stage in his career, Martin's reputation surely guarantees that he'll remain in-demand for as long as he wants. Somajo predicts that he’s unlikely to take a step back any time soon. “He really loves music and he’s always striving for that perfect song,” she says. “And he thinks very long-term – he’ll never put his real feelings about a song aside for a short-term success. I think that's another reason why he's stuck around so long.”

If you would like to comment on this story or anything else you have seen on BBC Culture, head over to our Facebook page or message us on Twitter.

And if you liked this story, sign up for the weekly bbc.com features newsletter, called The Essential List. A handpicked selection of stories from BBC Future, Culture, Worklife and Travel, delivered to your inbox every Friday.