Cannabis users looking for someone to share a joint with have a new app that lets them find like-minded smokers around the world.

The creator of the Who is Happy app, a Brazilian epilepsy sufferer who wants the drug decriminalised, says his software is a kind of "Foursquare for stoners", comparing it to the app that allows users to rate restaurants and other places they visit.

"The app is the first global platform of its kind allowing cannabis consumers to connect and unite to promote happiness while de-stigmatizing and hopefully decriminalising cannabis use around the world," Paulo Costa said.

Users who anonymously log their location will see a green cloud appear on the app's map, covering a 1-km radius. They can then check to see if others are partaking anywhere nearby, or elsewhere in the world. A greater number of users increases a location's "happiness" quotient.

Having been one of the top-30 downloaded apps in Brazil, the app ranks the home nation as the biggest user and therefore the happiest country.

Cannabis has been decriminalised for recreational and medical use in some US states but is illegal in Brazil.