If you’d told Alex Mullen a few years ago that he was capable of memorising a whole pack of cards in 21.5 seconds, he would have said you were being ridiculous. His memory wasn’t anything special – “below average” even. Fast-forward to today and Mullen, a medical student at the University of Mississippi, has just been crowned the World Memory Champion.

Mullen told me about a book he’d read called Moonwalking with Einstein. The book was written by Joshua Foer, a journalist who attended a US memory championship to write about what he thought would be “the Super Bowl of savants”. Instead, he found a group of people who had trained their memory using ancient techniques. Foer started practicing the techniques himself, and went on to win the competition the following year.

Mullen was spurred on to improve his own memory by Foer’s story. “I definitely didn’t have a great natural memory,” he said, “but in 2013 I started training using the techniques that Foer had talked about.” A year later, Mullen came second in the US memory championship. “It was really motivating, I kept practicing and eventually ended up at the 2015 world memory championship.”

The championship took place in December in Guangzhou, China. It consists of 10 rounds of mental challenges, which include memorising as many numbers as you can in an hour, remembering as many faces and names as you can in 15 minutes, or committing to memory hundreds of binary digits. The final event is always the speed card round, where competitors memorise a single pack of cards as fast as possible.

Mullen was in second place when they began the final task. He looked at the cards for 21.5 seconds – just one second faster than Yan Yang, the competition leader. It was enough to push Mullen into first place, winning the championship.

Mullen now holds the world record for remembering as many numbers as possible in one hour – 3,029. “A few years ago, I would have thought that was impossible,” he says. He also holds a half-dozen US records, which include him memorising 3,888 binary digits in 30 minutes.

Enter your mind palace

If you’re unable to remember a grocery list, let alone thousands of ones and zeros, these feats of memory may seem somewhat unattainable. But according to Mullen, anyone can do it. “You just have to create a mind palace,” he says.

For those of you who aren’t familiar with Sherlock Holmes, a mind palace is an image in your mind’s eye of a physical location that you know well. Perhaps it’s your house or your route to work. To remember many items, be it cards or groceries, you just walk through your mind palace and drop off an image of each item at specific places along the route.

You just walk through your mind palace and drop off images at specific places along the route

The technique is attributed to a Greek poet called Simonides of Ceos, who lived in 477 BC. Legend has it that Simonides was at a dinner party held by a rich and mean nobleman. Halfway through the banquet he was called outside to meet a messenger. As he stepped through the door, the roof over the banquet caved in, killing everyone inside. As friends and relatives sorted through the remains of their loved ones, crushed beyond recognition, Simonides thought back to where he had been sitting. Suddenly, he could picture speaking to the guest opposite him, another was sitting to his left, a third was at the head of the table; he realised he could identify the bodies by remembering the exact order in which everyone had been sat. This event was said to have led him to discover that the best way of remembering a group of objects or facts is to attach images to a specific and orderly location.

When I see the seven of diamonds and the five of spades I think of Michael Jordan

Centuries later, Eleanor Maguire at University College London and her colleagues scanned the brains of 10 people who had placed at the highest levels of the world memory championship. She hoped to identify whether they had any structural brain differences that predisposed them to having such an extraordinary memory. The tests could not establish any difference in intellect, nor any structural changes in their brains. The only difference appeared to be in the preferential use of three areas involved in navigation. The super-memorisers were better at remembering purely because they were walking around their mind palaces.

Paint by numbers

When it comes to remembering numbers or binary digits, each competitor has their own system for converting these items into images. Mullen, for instance, uses a “two-card” system for memorising a pack of cards. It involves converting suits and numbers in phonetic sounds. Take the seven of diamonds and the five of spades, for example. The diamond and the spade together create an ‘m’ sound, he says. The seven is converted to a ‘k’ sound and the five is an ‘l’. Although it’s not immediately obvious where each sound comes from, they are in fact based on a code that someone else thought up a long time ago, says Mullen. “Once you’ve got your m, k and l, you just make up an image which fits those letters – they reminded me of the word Michael, so when I see that pair of cards I think of Michael Jordan.” He says he has another trick which halves the 2,704 possible pair combinations, but he didn’t want to go into details.

Mullen won the world title from Jonas Von Essen. Like Mullen, Von Essen also discovered a love of memorising things late in life. “I was wandering around a library and saw a book that said you can improve your memory and thought it sounded cool, because I really wanted a better memory so that I could be better at school and exams,” he says.

Almost immediately I realised I could memorise more things than I ever dreamed possible

Von Essen, a student at the University of Gothenburg, tried out a few of the techniques – the benefits were instantaneous: “Almost immediately I realised I could memorise more things than I ever dreamed possible,” he says. His first competition was the Swedish memory championship in 2012, which he won. He went on to become world memory champion in 2013 and 2014.

Von Essen uses a slightly different technique to remember cards. He has an image that he associates with each individual card, which he groups into sets of three, before placing them on a short walk through his house. “So I might start at the front door,” he says. “Say it’s the four of hearts, the nine of hearts and the eight of clubs – I’d open the front door and see an image of Sherlock Holmes playing the guitar and eating a hamburger. Then I’d walk into the hall and create a new scene with the next three cards.”

What’s your favourite restaurant?

Memory palaces can be anywhere – hotels, houses, routes to work, restaurants, a favourite holiday, a park or a train ride. “If you sit and think about it for a moment you can come up with hundreds of locations that you know pretty well,” says Mullen.

Both of the world champions use specific mind palaces for things they want to remember in the short term – like a pack of cards – and things they want to remember forever. “So for the five-minute number competition I use the same two palaces, then re-use them the next time,” says Mullen. “Because I don’t want to remember a five-minute event I did two years ago. But when I’m learning things for school, say drugs that treat stomach disorders, I’ll fill up a palace and not use it for anything other than related information.”

‘Does it work every time? Doesn’t your mind ever go blank?’ I asked both competitors. No, was the answer. “If you’ve put it in your mind palace, it’s always safe,” says Von Essen.

Another thing they agree on is that the gift of extraordinary memory is nothing special – anyone can learn how to do it to a fairly decent standard. Mullen trained just half-an-hour to an hour each day in preparation for the World Championships. Von Essen also trained for small amounts of time each day, before gearing up to five hours a day just before competitions.

Von Essen has taken a break from competing, but he’s hoping to break a world record next year for memorising pi. So far he’s reached 10,000 digits, but by next year, he hopes to have increased that to 100,000 digits.

 Mullen can’t make a living out of his title. “There’s prize money but not enough to live on,” he says, so is instead concentrating on using his techniques to help him – and others – through school. “I do my best to promote the techniques to others because they are really useful for everyday life. I’m trying to show people how to use the techniques for learning more generally, rather than just for competitions,” he says. “I like the whole competitive process, but I think there’s a lot more you can gain from using these techniques in different areas of your life.”

Von Essen agrees. It’s like riding a bike, he says. It seems difficult and impressive if you haven’t tried it, but with a bit of practice, anyone can do it. “You don’t have to become a world champion to have a much better memory than normal,” he says, “same as you don’t have to win the Tour de France to get to the store faster than walking.”

Want to improve your memory? Here are BBC Future's guides on How to improve your memory in 40 secondsHow to learn like a memory champion and How to learn 30 languages.

Join 500,000+ Future fans by liking us on Facebook, or follow us on Twitter, Google+, LinkedIn and Instagram.

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, Earth, Culture, Capital, Travel and Autos, delivered to your inbox every Friday.