With the World Cup fast approaching a survey of football fans from around the world has revealed widespread, majority support for any international players thinking about coming out as gay.

Although the results are varied and reflect the cultural contexts of the regions in which respondents live the overall message is that homophobia among football supporters seems to be a diminishing, albeit slowly, problem.

The anonymous poll, organised by Stonewall, the leading equality charity, and Football Addicts, the Swedish developer of the app Forza Football, asked fans if they would be comfortable were a player in their national team to come out as gay.

Football Addicts says it is the largest such survey to ever have been conducted as 30,000 fans in 29 countries responded. The results from those in which fewer than 500 people did have been discounted here.

The results reveal that Sweden and Denmark – where 79% of respondents said they would be comfortable with a gay international – are the most supportive, closely followed by the United Kingdom – 73%.

While the figures from Portugal and Italy – 69% and 68% respectively – can be interpreted as encouraging, attitudes appear a little more reactionary in Germany – 53% – and the United States – 52%. Perhaps surprisingly the supposedly liberal Netherlands – 65% – proved less tolerant than some southern European nations.

It may seem regrettable that there was a need for such a project – or indeed any debate about the issue – in 2014 but James Taylor, head of policy at Stonewall, accepts that football’s embrace of certain aspects of diversity lags behind that experienced in other spheres.

“Over the last 10 years we have seen great strides in attitudes towards lesbian, gay and bisexual people,” said Taylor. “Sadly, our national game has not moved as far or as quickly as other parts of society. It’s clear that more needs to be done to tackle homophobia not just in football, but sport more generally.

“Stonewall will continue to work with the professional bodies and clubs at all levels to improve the game for gay players and gay fans. These stats show that our mission is just as vital today as ever.”

Patrik Arnesson, the co-founder of Football Addicts, pointed out that his native Sweden is home to the only domestic league in Europe to have housed an openly gay player – Anton Hysen, formerly of BK Hacken. “His [Hysen’s] courage perhaps contributes to the Swedes’ belief that a person’s sexuality is of no relevance and has no impact on their sporting ability,” he said.

Last year Robbie Rogers, formerly of Leeds United and now back playing with LA Galaxy, and Thomas Hitzlsperger, the former German international, came out as gay. They received widespread support,with Rogers telling the Guardian: “Most of what I feared hasn’t happened. It’s been quite the opposite, with nothing but support and love.”