Twenty years to the day after the first book in the Harry Potter series was published, fans gathered online and in the real world to express their enduring love for J.K. Rowling's magical creation.

Since "Harry Potter and the Philosopher's Stone" came out in 1997, with a first print run of just 500 copies, the series of seven novels has sold 450 million copies worldwide in 79 languages and spawned a blockbuster movie franchise.

The book appeared in the United States a year later as "Harry Potter and the Sorcerer's Stone".

On Monday, some fans took the day off work to celebrate the anniversary, heading to significant locations such as King's Cross train station in London, which in the stories is one of the gateways into the world of witches and wizards.

The real-life station features a mock-up of Platform 9-3/4, the departure point for trains to Hogwarts School of Witchcraft and Wizardry. The mock-up is a bustling spot where tourists and fans queue to pose for photos wearing Potter-themed scarves or costumes.

"Harry Potter I think still means so much to so many people even though it's 20 years now," said Clara Carson, whose job at the nearby souvenir shop involves taking photos of the fans and holding up the scarves to achieve a windswept effect.

"I'm a fan myself so it's really nice to come in and be with people that are all into the same things that you're into," she said. "Whether they're kids or my age or even adults, they're always just so excited."

Childhood friends Charlotte Keyworth and Joanne Wylie, both 26, had come down to London from northern and eastern England for the occasion.

They were part of the first generation of Potter fans, having read the first volume as young girls and then endured the agonising wait for each new episode as they were published over a period of 10 years.

"We've grown up with it, with Harry Potter," said Keyworth, who was sporting a Hogwarts t-shirt. "We're planning on going to the studio tour this afternoon and celebrating in our own little way," she said, referring to the studios where the Potter movies were shot.

Wylie, who has a permanent tattoo on her forearm of the Deathly Hallows symbol, an important element in the story, said the Potter stories still bring her joy and comfort.

"It was always something that just sort of boosted your spirits and made you realise you could get past the dark points," she said.

Her sentiments were widely echoed on social media, with legions of fans posting their favourite quotes or video clips, or just thanking Rowling for the happy memories.

"After all these years... Always!" wrote Twitter user Anu -- a reference to a moving moment in the story when it is revealed that Harry's nemesis Severus Snape had always loved Harry's dead mother Lily.

Rowling, who has 10.8 million followers on Twitter, also took to the medium to mark the anniversary.

"20 years ago today a world that I had lived in alone was suddenly open to others. It's been wonderful. Thank you," she wrote.