Bank worker Prita Mulyasari, 32, broke into tears and the court erupted with applause as the panel of judges dismissed Omni International Hospital's complaint, after a months-long trial that has outraged the nation.
"The email sent by the defendant doesn't contain any defamation. It constitutes criticism so the public will be protected from mistreatment by any hospital or doctor," the judges said in their ruling.
Mulyasari had written to about 20 of her friends about being misdiagnosed with dengue fever at the hospital, when in fact she had mumps.
The hospital filed criminal charges after the emails were circulated without her knowledge on social networking website Facebook.
She was facing up to six years in jail and had already spent weeks in police custody without charge.
"I can't believe this. This is the power of God," Mulyasari told MetroTv in an interview shortly after the court announced its ruling, which was broadcast live on television.
Wearing a white blouse and Islamic headscarf, she thanked her family for their support throughout her ordeal.
"From the beginning, I believed there would be an end to this problem. God never sleeps," she said, adding that justice had been done.
"It never crossed my mind that I would end up in court over an email I sent to friends."
Arrested on May 13, Mulyasari spent three weeks in custody while she was still breastfeeding her second child.
Public anger at her detention, symbolised by a Facebook support group with more than 100,000 members, forced authorities to release her and bring her before the courts.
She was fined 204 million rupiah (21,400 dollars) -- much more than a year's salary for most Indonesians -- under the civil code for defaming the hospital, which also filed criminal charges against her.
The hospital's dogged pursuit of the soft-spoken, deeply religious mother-of-two struck a chord of resentment among ordinary Indonesians who see the judiciary as a market where the rich go free while the poor suffer.
A group of bloggers started a "Help Prita" movement which raised more than 50,000 dollars in public donations to help her pay the fine.
"I'm blessed and thankful because suddenly I feel that I'm not alone," Mulyasari told AFP earlier this month.
Taufik Basari, a human rights lawyer from the People's Legal Aid Foundation, said the case illustrated a deep "imbalance" in favour of the rich and powerful at the heart of Indonesia's legal system.
"The powerless people, either politically or economically weak, are always at a disadvantage. There's always unequal treatment for them. This is supported by the corrupt behaviour of law enforcers," he said.
Omni Hospital, perhaps realising that it had done more damage to its image by pursuing Mulyasari than she had ever done in her emails, proposed this month to drop its civil suit claim for damages if she agreed to a public apology.
But Mulyasari has filed an appeal to the Supreme Court against the fine.
If she wins, she has promised to give the public donations to charity.