Henri van Breda, who denied the attacks, also left 16-year-old sister Marli in a coma with near-fatal injuries, for which he received a 15-year sentence.
The 23-year-old was convicted of three counts of murder and one of attempted murder last month.
Judge Siraj Desai said that in light of the evidence, the verdict had been “inescapable”.
The judge said that “each murderous attack on a family member is a severe crime and warrants the severest punishment”.
Van Breda’s rampage had been “savage and vicious” with “an almost unprecedented degree of disregard for one’s family”, he added.
Marli was left with severe injuries to her head, neck and throat.
After being in a coma for weeks, she could remember nothing of the attack and denied a request to appear as a witness in her brother’s defence.
A motive has not emerged.
“I’m searching for some human factor that to some degree diminishes the sheer seriousness of these crimes,” Judge Desai said at a hearing on Tuesday.
“There must be something… I’m appealing to (him) – put before me some reason for these attacks.”
Pieter Botha, for the defence, had asked for a “merciful” sentencing, adding that van Breda was a first-time offender and “barely 20” when he carried out the killings.
Van Breda, wearing a light grey suit at the court in Cape Town, did not show any emotion as the sentences were handed down.
His girlfriend watched from the public gallery as he was led away.
Van Breda murdered his parents Martin, 54, Teresa, 55, and brother Rudi, 21, in January 2015.
He told the court he had been in the toilet when a masked intruder entered the family home in Stellenbosch, claiming to have fought with the attacker and been stabbed multiple times before blacking out.
But the prosecutor said his injuries had been self-inflicted.
Van Breda also failed to call emergency services immediately, lawyers said, and instead called his girlfriend before raising the alarm.
In a tape of the emergency services call heard during the trial, he said his family members were “bleeding from the head” before appearing to giggle briefly.