District Judge Vanessa Baraitser ruled that it would be "oppressive" to extradite the 49-year-old Australian because of his mental health as he faced up to 175 years in prison for allegedly hacking into US government computers.
She described Assange as "a depressed and sometimes despairing man" who had the "intellect and determination" to circumvent any suicide prevention measures taken by American prison authorities.
The US government immediately announced that it would appeal the decision.
Assange's lawyers, meanwhile, said they would press for his release from a London prison during a bail hearing set for Wednesday.
Assange, who sat in the dock at London's Central Criminal Court for the ruling, wiped his brow as the decision was announced. His partner Stella Moris, with whom he has two young sons, wept.
"Today is a victory for Julian. Today's victory is the first step towards justice in this case," Moris said outside court, saying she was "extremely concerned" that the US government planned to appeal.