The massacre during Friday prayers wounded more than 40 others in the country's worst-ever mass shooting, which Prime Minister Jacinda Ardern condemned as terrorism.
"My warmest sympathy and best wishes goes out to the people of New Zealand after the horrible massacre in the Mosques. 49 innocent people have so senselessly died, with so many more seriously injured. The U.S. stands by New Zealand for anything we can do," Trump wrote in a post on Twitter.
Earlier, White House press secretary Sarah Sanders said in a statement that the United States strongly condemned the attack.
"The United States strongly condemns the attack in Christchurch. Our thoughts and prayers are with the victims and their families. We stand in solidarity with the people of New Zealand and their government against this vicious act of hate," Sanders said.
New Zealand police said three people were in custody including one man in his late 20s who was charged with murder.
The accused gunman's manifesto praised Trump as "a symbol of renewed white identity and common purpose." The White House did not immediately respond to a request for comment.
Trump drew strong criticism in the days after a deadly white supremacist rally in Charlottesville, Virginia, in 2017 when he equated white supremacists with counter-protesters and saying "both sides" were to blame.
He said on the anniversary of the rally in August that he condemns "all types of racism and acts of violence."
Trump has at times indicated his supporters could turn to violence. Asked about possible impeachment in a December interview with Reuters, he said, "I think that the people would revolt if that happened."
Want to enjoy 'Zen' reading - with no ads and just the article? Subscribe todaySubscribe now