Australian Brenton Tarrant had earlier pleaded guilty to the murder of 51 people, attempted murder of another 40 people and one charge of terrorism.
The judge called his actions "inhuman", adding that he had "showed no mercy".
The attack, which was livestreamed by Tarrant, shocked the world.
"Your crimes are so wicked that even if you are detained until you die, it will not exhaust the requirements of punishment," said Judge Cameron Mander in a Christchurch court on Thursday.
On imposing a sentence of life without parole, Justice Mander said: "If not here, then when?"
Tarrant said through a lawyer in court that he did not oppose the prosecution's application for a life without parole sentence. He had earlier also refused the right to speak at his sentencing.
In the wake of the killings, which took place in March last year, New Zealand brought in stricter gun laws.
What happened during the sentencing?
The sentencing hearing lasted four days and more than 60 victim impact statements were heard.