Lopez has been detained since early 2014 over accusations of inciting anti-government protests.
"By the power of Supreme Court Judge Maikel Moreno, the criminal court of the Supreme Court Justice grants house arrest to Leopoldo Lopez due to health problems," the court tweeted.
A relative of Lopez's confirmed the news of the house arrest. Details about his physical condition weren't immediately available.
A photo from the family showed a smiling Lopez with his children at home.
Speaking outside Lopez's home, National Assembly Vice President Freddy Guevara read the following statement from the released opposition leader:
"Venezuela, this is a step toward freedom. ... If continuing my fight for freedom means going back to Ramo Verde (Prison), I am ready to do it. ... I reiterate to you my commitment to fight until we conquer freedom. ... We reiterate that tomorrow, at the 100th day of resistance, we return to the streets and call for the people to vote in the July 16 plebiscite."
That vote will pose questions on the level of confidence in President Nicolas Maduro and seek public input on his rewriting of the Venezuelan Constitution.
Maduro said Saturday he accepts and supports the release of Lopez into house arrest.
"I, as head of state, accept their decision and I say more, I support the decision of the Supreme Court of Justice of the measure that substitutes house (arrest) for imprisonment," he said. "And you know of the absolute and profound differences that I have with Mr. LL."
The South American country is in the throes of an economic crisis
that has spurred mass protests calling for a change of government, especially over the past few months.
Lopez's release follows several tumultuous days, including a physical attack by regime supporters on opposition lawmakers
in the National Assembly on the nation's Independence Day on Wednesday.
Lopez's supporters rejoiced on Saturday morning, and crowds gathered outside his home. At one point, Lopez stood on the roof and held up a Venezuelan flag above the cheering throngs of people.
Other prominent leaders rejoiced on Twitter or in statements.
"This must be an advancement towards full-fledged freedom," fellow Venezuelan opposition leader and National Assembly representative Henry Ramos Allup said on Twitter.
Spanish Prime Minister Mariano Rajoy, who has advocated for the release of Venezuelan political prisoners, posted on Twitter that he was "happy that @LeopoldoLopez has come home to @LilianTintori and their children."
Lopez's wife, Lilian Tintori, said Friday via Twitter that she had been able to see him for an hour.
"I demand that tomorrow I can visit him with my children," she tweeted
Luis Almagro, secretary general of the Organization of American States, said on Twitter that house arrest for Lopez is "only a first step."
"We salute the freedom of Leopoldo Lopez, an opportunity for national reconciliation and a democratic solution to a grave crisis," he said in a tweet.
The U.S. State Department said Saturday it welcomed the transfer of Lopez to house arrest.
"This is a significant step in the right direction by the government of Venezuela. We reiterate our call for the full restoration of Mr. Lopez's liberty and his political rights."
Arrest in 2014
Lopez, a former mayor of a Caracas district with ambitions for the presidency, has long been a vocal opponent of the socialists in power and was banned in 2008 from running for office on accusations of corruption.
Lopez described the banning as political retribution. An international human rights court cleared him in 2011, but the Supreme Court upheld the ban.
In February 2014, at least three people were killed during an anti-government protest in the capital, and authorities blamed him for the violence. He turned himself in, and was sentenced in 2015 to nearly 14 years in prison.
This spring, he appeared on video to dispel health rumors after a journalist tweeted he'd been sent to a hospital. Lopez in May appeared on state television in a white tank top with prison bars behind him, citing the date and time in what he said was a "proof of life" message.
Days later his wife, who visited him in prison, said he called on demonstrators to keep alive mass protests
against Maduro's government.
Public pressure against the government increased earlier this year when all powers of the opposition-led National Assembly were transferred to the Supreme Court, which is stacked with government loyalists. The court revoked that ruling in April after widespread criticism.
Anti-government protesters have taken to Caracas' streets over the past several months. Maduro has sent the Venezuelan military onto the streets to maintain order, leading to deadly clashes. More than 85 people have died in the unrest.
Demonstrators have called for Maduro to step down, accusing him of eroding democracy.
Also spurring protesters: Unemployment is set to surpass 25% this year. Soaring inflation and widespread shortages of medicine, food and other essentials have plagued the country.
Some Venezuelans have opted to leave, crossing the border into Colombia
after months without basics such as milk, eggs, flour, soap and toilet paper.
The government has been accused of intimidating and restricting the media, including taking CNN en Español off the air. It tightly controls visas for foreign journalists including CNN, arresting those who report from inside the country without proper permits.