"Hate speech is spreading like wildfire in social media. We must extinguish it. There is no room for hate speech – online or offline."
His promise to do more to tackle the online threat comes as Prime Minister Jacinda Ardern prepares to address world leaders and tech giants in Paris for the Christchurch Call summit, which will try to find a global path for tackling hate speech.
Guterres, who is visiting New Zealand before flying to Fiji to attend the Pacific Islands forum this week, laid a large bunch of flowers outside the mosque before being introduced to some of those injured in the attacks by Imam Gamal Fouda and Muslim Association of Canterbury president Shagaf Khan.
Speaking outside after discussing the atrocity and its aftermath with leaders from the Muslim community, Guterres said he had also set in motion an initiative to protect and safeguard holy sites.
The secretary-general, who was joined by Climate Change Secretary James Shaw ahead of environmental talks in Christchurch later on Tuesday with Ngai Tahu, said he makes a "visit of solidarity" each year during Ramadan, last year to Mali, in 2017 to Afghanistan.
"This year, because of the terrible terrorist attack against your community, I wanted to be here with you," he said.
"Ramadan is a season of reflection, remembrance and renewal. I am here to express my deepest condolences, my profound respect, and the fullest measure of my solidarity to you, your families and the community.
"I know there are no words to relieve the hurt and sorrow and pain. But I wanted to come here personally to transmit love, support and total and complete admiration.
"I want to thank you for doing what you're doing to help us better know each other – and see our shared humanity.
"In these trying times, I am here to say with a full heart: You are not alone. The world is with you. The United Nations is with you. I am with you."