Archie Battersbee, 12, was discovered unconscious at his Southend, Essex, home on April 7.
Doctors at the Royal London Hospital in east London told the court he was “highly likely” brain-stem dead and asked for his life support to be turned off.
Hollie Dance and Paul Battersbee, Archie’s parents, disagreed.
The court previously heard that Archie suffered brain damage during a domestic incident that his mother suspected was related to an online challenge.
Archie hasn’t been able to regain consciousness since.
Mrs Justice Arbuthnot concluded in a written ruling that Archie died at noon on May 31 based on MRI scans taken that day.
“I find that irreversible cessation of brain stem function has been conclusively established,” she said.
“I give permission to the medical staff at the Royal London Hospital to stop mechanically ventilating Archie Battersbee.”