Image copyright Freelancer Image caption Matt Barrie was trying to help his mother set up a website

It was doing a favour for his mother that gave entrepreneur Matt Barrie the idea for setting up a business that is now worth more than A$400m ($300m; £243m).

His company and website Freelancer has a simple concept - it connects people who have work they need doing with others who compete to do the task by submitting the fee they would charge.

Founded just eight years ago in Sydney, today the website has more than 22.5 million users around the world, both freelance workers and those seeking their services.

Jobs advertised on Freelancer include everything from help with building a mobile phone app, to writing a company report, designing a tattoo, and help with gaining publicity for something.

US space agency Nasa has even used the website since 2015, allowing people to bid to help design items for the International Space Station, including a new robotic arm.

It is a pretty good success story for a 43-year-old who admits that when he came up with the idea for Freelancer he was "a broken man".

'Wrong fit'

In 2006 Mr Barrie had walked out of his first start-up - a Sydney-based firm called Sensory Networks that made computer chips for security equipment. He was not feeling good.

Image copyright Freelancer Image caption Site users submit photos from around the world - this one is from Maccu Pichu in Peru

"People used the product but everything was wrong with how we sold it," he says.

Despite a blaze of publicity and the support of venture capitalists (VCs), the marketing proved too tough, and the company was struggling. So Mr Barrie quit.

"You feel you have let your VCs down, the board, your friends that you hired, your family," he says.

Sensory Networks went on to survive without Mr Barrie, and was eventually bought by chip giant Intel in 2013 for $20m, but he says that back in 2006 he "really felt like a failure".

Image copyright Freelancer Image caption Freelancer had humble beginnings

After a few months of "decompressing", Mr Barrie was beginning to think about his next move when the 2007 global financial crisis swept in.

"The whole world was collapsing. Businesses weren't getting funded anymore. I thought, 'what am I going to do with myself?'" he recalls.

He decided to take advantage of the enforced downtime to build a website for his mother, a wholesale art and craft supplier.

He wanted to include a directory of the stores she supplied, thinking it might encourage others to want to be included. The first Excel spreadsheet had 1,000 rows.

Faced with that, Mr Barrie decided to outsource the data entry side of things to local kids. But even offering A$2,000 overall, nobody came running.

"I looked around, asked a few people, and they'd say, 'oh it's boring.' I'd reply, 'I know it's boring! That's why I want you to do it.'"

Image copyright Freelancer Image caption Matt Barrie broke the bell when the company floated in 2013

After four months Mr Barrie started searching online in desperation for cheap data entry, and stumbled upon a site based in Sweden called Getafreelancer.

"It was the ugliest site you have ever seen in your life. I eventually figured out how to post a job," he says.

"I went to get lunch, and came back to 74 emails from people saying you're offering A$2,000, I'll do it for A$1,000, A$500 and so on… I thought it was a scam."

He eventually hired a team in India who did the job in three days for A$100.

"I thought was incredible, a whole army of people out there, many from emerging markets. I looked at all the projects on the website. It was like an ebay for jobs. I thought wow.

Image copyright Freelancer Image caption Matt's colleagues had fun when he was on the cover of Australian business magazine BRW

Mr Barrie was so impressed by the concept that he decided to set up his own version.

The VCs who had flocked to his first start-up were far more cautious this time round, and banks were unwilling to loan to a web-based business with no physical, recoverable assets in the event of failure.

In the end a friend who had sold his own firm stumped up the money, and Mr Barrie first secured workers via Getafreelancer, before then buying that business.

Freelancer, whose entire operation is cloud-based using Amazon Web Services, has since gone on to buy up 18 other rival sites. Its directly employed workforce now totals 570 people.

'Ultimate meritocracy'

Sites like Freelancer have faced criticism for driving down prices for professionals trying to sell their services, but Mr Barrie counters that the company has had a huge, positive impact on millions of people in developing countries.

"You can be somewhere where your average wage is A$2 a day," he says.

Image copyright Getty Images Image caption Matt Barrie says he is a workaholic

"The average project [on Freelancer] pays A$200.

"You can make your month's salary in a few days. It's the ultimate meritocracy. It's up to you to figure out what you want to do."

And it is also not necessarily the lowest bidder who wins the job - Freelancer says that 47% of the projects on its site are awarded to "the median bidder or higher".

Entrepreneur Emma Sinclair, co-founder of human resources software business Enterprise Jungle, says firms are increasingly looking to hire non-staff to complete projects rather than carry out the work in-house.

"Nearly 35% of today's total workforce is comprised of non-employee workers and this is set to continue to grow," she says

"Sites like Freelancer are therefore very well-placed to service both the growing on-demand labour force looking for work, as well as the corporates who are hiring them.

"It is an invaluable marketplace for talent, with an all-important rating system to weed out the poor or unreliable performers."

On a day-to-day basis Mr Barrie is, by his own admission, a workaholic.

"I live this, I breathe it. I get up in the morning and start work. I'm often in the office until 10pm.

"I've had several offers to sell - one formal. I had a good think, and said I couldn't think of doing anything else."