A new biography of the Pippi Longstocking author Astrid Lindgren reveals an unorthodox life that helped shape one of children’s books’ most memorable characters.

Once upon a time, long before Goodnight Stories for Rebel Girls elbowed aside fairy-tale princesses and replaced them with inspirational trailblazers like Ada Lovelace and Amelia Earhart, an idiosyncratic fictional heroine was rebelling against sexism in children’s literature, captivating young readers around the world and showing them that there was more than one way of being a girl.

With her red plaits and freckles, she thumbed her nose at social conventions and had moxie to spare. She was independent and legendarily strong – so strong she could lift a horse with one hand. She was also in possession of a private income thanks to a stash of gold coins, and, at all of nine years old, lived alone with her monkey and horse, freeing her to sail the high seas and boogie with burglars. Little wonder successive generations of girls wanted to be her – some of us still do.

Her name, of course, is Pippi Longstocking, and as a fascinating new biography reveals, her indefatigable creator Astrid Lindgren could easily hold her own among the stars of Rebel Girls. Unmarried teen mum, outspoken advocate of the rights of women and children, campaigner for everything from environmentalism to pacifism: this was a path neither expected nor easy for a farmer’s daughter raised in a pious, conservative community in 1920s Sweden. And yet it became Lindgren’s path, as Jens Andersen shows in Astrid Lindgren: The Woman Behind Pippi Longstocking, translated from Swedish by Caroline Waight.

Little Astrid was a natural storyteller and inherited a gift for language from her mother, who wrote poems when she had the time. As a teenager, Astrid experimented with cross-dressing and discovered jazz. She became a trainee journalist on the local newspaper at 17, and when she was 18, her 49-year-old married boss – a father of seven – got her pregnant.

“Girls are so silly. Nobody had ever been seriously in love with me before, and he was. So of course I thought it was rather thrilling,” she later admitted. When her son was born, she was forced to leave him with a foster family. Heartbroken, she tried to earn a living in Stockholm as a stenographer, and it wasn’t until 1931, when she married, that she was finally able to reclaim him.

During World War Two, Lindgren worked censoring mail for the neutral Swedish government. It was, she said, a ‘dirty’ job, but in the optimistic light of peacetime, when the daughter she’d gone on to have in 1934 was ill in bed with pneumonia, she dreamt up a joyously defiant counterpoint to fascism.  

Pippi is subversive and free-spirited, a true disruptor. She is also a loner and it’s hard to believe she’d have been quite the same had Lindgren’s early adulthood not been quite so tumultuous.

Follow the yellow brick road

Lindgren went on to write many other books, screenplays and essays, regularly appearing in the media and ultimately becoming a global brand. Yet it’s Pippi for whom she is remembered. Since the first instalment of her adventures was published in 1945, Pippi has never been out of print, and remains internationally beloved.

These days, children’s literature gets a bad rap when it comes to female characters. Remember that video the Rebel Girls team released? Headlined ‘If you have a daughter, you need to see this’, it vividly called out gender bias by showing a mother-daughter team removing from a shelf all the books that had no male characters (three) then all the books with no female characters (141), and finally those whose female characters were princesses, leaving the shelf almost bare. And yet Pippi isn’t the only feminist icon hanging out in the fiction stacks – nor was she the first.

Almost half a century before she sprang to life in Lindgren’s imagination, L Frank Baum was using the newspaper he edited in Aberdeen, South Dakota, to cheer on America’s suffragettes. When he wrote his now-classic tale The Wonderful Wizard of Oz, its girl heroine, Dorothy Gale, was shaped by his beliefs, as well as by his observations of strong pioneer women weathering life on the Great Plains.

How tornadoes and wicked witches would have thrilled Nancy Blackett! Nancy is what would once have been called a tomboy. A deft sailor kitted out in shirt, shorts and pirate cap, she’s also the daughter of a single mum, which might account for her leadership skills and resourcefulness.

Nancy appears in nine of the dozen novels that make up Arthur Ransome’s Swallows and Amazons series. She let readers of the 1930s know that girly domesticity wasn’t their only option.

Some 80 years later Ballet Shoes remains popular, claiming JK Rowling among its fans

She’d likely have hit it off with Petrova Fossil, one of the heroines of Noel Streatfeild’s Ballet Shoes. Having been abandoned, along with her sisters Pauline and Posy, by their adoptive father, the girls discover that a powerful and supportive sisterhood surrounds them. Helped along by various women, they find adventure and financial independence through ballet and acting. Or at least, Pauline and Posy do; Petrova is happiest with her head inside the bonnet of a car, and eventually becomes a pilot.

Ballet Shoes was Streatfeild’s debut novel and some 80 years later, it remains popular, claiming JK Rowling among its fans (she still rereads it, apparently).

Pippi the pioneer

Ludwig Bemelmans’ Madeline certainly knows how to wring the best from a less than optimal situation. She also has pluck in spades. Despite being the littlest of Miss Clavel’s charges in their vine-covered Parisian boarding school, Madeline loves snow and ice, isn’t scared of mice, and to the sharp-toothed tigers at the zoo says simply “pooh pooh”. Borne off by ambulance in the middle of the night for an appendectomy, she parlays her misfortune into a dolls’ house sent by her otherwise absent pa, and wears her scar with such pride that it becomes the envy of her classmates.

It took Thomas the Tank Engine until 2017 to begin addressing its gender imbalance

According to Bemelmans’ grandson, Madeline was based on the author himself, who always felt like an outsider. Yet what’s so refreshing about Madeline is that she doesn’t aspire to be an insider, one of the crowd. In fact, in a group of 12 girls who move through their days like a synchronised swimming team, she alone stands out.

Virginia Lee Burton was born just a couple of years after Astrid Lindgren, yet her childhood couldn’t have been more different. Raised in a Californian artists’ colony, she went on to found her own in Massachusetts, where she also wrote and illustrated a series of picture books including Katy and the Big Snow. Its eponymous heroine is brave and utterly determined. She’s “very big and very strong and she could do a lot of things”. Katy also happens to be a caterpillar tractor – a female caterpillar tractor.

these female characters show the littlest readers that boys didn’t have a monopoly on big and strong

It took Thomas the Tank Engine until 2017 to begin addressing its gender imbalance but Katy debuted in 1943. Though her two sons were the intended audience for all her children’s stories, the plucky machines that chug through their exquisitely designed pages are invariably female – look out, too, for Mary Anne the steam shovel and Maybelle the cable car. Strong, tireless and independent, these female characters show the littlest readers that boys didn’t have a monopoly on big and strong.

But true equality confers the right to be less than impressive, too. That’s what makes Louise Fitzhugh’s 1964 heroine so interesting. Harriet of Harriet the Spy fame – or should that be notoriety? – is snarky, spiteful and entitled. She’s the anti-Nancy Drew, scorning sweater sets and a desire to please for jeans and a tool belt. Yet unlike so many classic heroines who came before her, she is not forced to repent. More gossip than sleuth, she ends the novel having been schooled in tact but otherwise triumphantly flawed and wholly unrepentant.

The strengths and achievements of real-life women who’ve shaped our world are something that girls and boys both should be reading and dreaming about. But fiction tells its own unique tales, and while there is always work to be done, a little rummaging through the stacks increasingly yields memorably liberated heroines to inspire young readers of all tastes. From Judy Blume’s Sally J Freedman to Roald Dahl’s Matilda, Jacqueline Wilson’s Tracy Beaker and Andrea Beaty’s Rosie Revere, Engineer, their existence is thanks in no small part to Pippi and her pioneering pals.

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 “If You Only Read 6 Things This Week”. A handpicked selection of stories from BBC Future, Culture, Capital and Travel, delivered to your inbox every Friday.