Looking tired and drawn but happy, they appeared briefly before the cameras at the offices of El Mundo newspaper, Espinosa's employer, and hugged relatives and colleagues.
"Thanks to all those who were worried about us and made it possible for us to come home. As you can see, we are perfectly well," Espinosa said.
They declined to talk about their captivity, however.
"I cannot say anything. It is out of our hands," Vilanova said.
El Mundo said the two were "freed and handed over to the Turkish military" before being flown home on a Spanish military jet.
"Pure happiness," wrote Espinosa's girlfriend, the journalist Monica Garcia Prieto, on Twitter early Sunday, without giving further details.
"Their relatives are feeling excitement and joy because this puts an end to a nightmare that has lasted six months," a spokesman for their families, Gervasio Sanchez, told AFP.
Espinosa, 49, and Vilanova, 42, were seized on September 16 as they tried to cross the Syrian border to Turkey, the latest of scores of journalists captured while covering Syria's civil war.
There was no word on whether any demands were made by their kidnappers or any ransom paid.
El Mundo identified the captors as members of the Islamic State of Iraq and the Levant, a jihadist faction in Syria with roots in Al-Qaeda's Iraqi affiliate.
The group has fought against the regime of Bashar al-Assad in Syria but has also been battling other rebel groups.
The newspaper had kept the kidnapping quiet until December while it contacted the captors via intermediaries. It said at that time that the kidnappers had made no demands.
"It has been a hard few months. We knew the wait would be long but you never get used to it," said the director of El Mundo's international pages, Ana Alonso Montes, on Sunday.
"You never know when the moment of liberation will come, although we never doubted it would," she told national radio.
- Reporting Syrian bloodshed -
Award-winning reporter Espinosa has been a Middle East correspondent for El Mundo since 2002 and is based in Beirut.
Like Vilanova, he has covered some of the most dangerous points in the Syrian conflict, including the siege of Homs in February 2012.
On February 22 he escaped that bloodbath in which human rights groups said 700 people were killed and thousands injured, and made it back to Lebanon a week later.
Among those killed in Homs were two other Western journalists: US reporter Marie Colvin and French photographer Remi Ochlik.
Espinosa wrote of his escape from the city, under fire among a crowd of wounded refugees, in a compelling reportage published in March 2013.
An online forum that frequently features statements from jihadists had also called on the militants to free the two.
The Honein jihadist forum said the two journalists were a "good hand for advocating our issues in Iraq and Syria, and carrying the silenced truth".
Garcia Vilanova has contributed to Agence France-Presse and other world media such as the New York Times and the Washington Post.
Media rights group Reporters Without Borders ranks Syria as the most dangerous country in the world for journalists.
A third Spanish journalist seized separately in Syria in September, Marc Marginedas, a correspondent for the Catalan daily El Periodico, was freed early this month.
French, US and Syrian journalists are among the others still missing in Syria.
----------------------------------------------------------------
"Thanks to all those who were worried about us and made it possible for us to come home. As you can see, we are perfectly well," Espinosa said.
They declined to talk about their captivity, however.
"I cannot say anything. It is out of our hands," Vilanova said.
El Mundo said the two were "freed and handed over to the Turkish military" before being flown home on a Spanish military jet.
"Pure happiness," wrote Espinosa's girlfriend, the journalist Monica Garcia Prieto, on Twitter early Sunday, without giving further details.
"Their relatives are feeling excitement and joy because this puts an end to a nightmare that has lasted six months," a spokesman for their families, Gervasio Sanchez, told AFP.
Espinosa, 49, and Vilanova, 42, were seized on September 16 as they tried to cross the Syrian border to Turkey, the latest of scores of journalists captured while covering Syria's civil war.
There was no word on whether any demands were made by their kidnappers or any ransom paid.
El Mundo identified the captors as members of the Islamic State of Iraq and the Levant, a jihadist faction in Syria with roots in Al-Qaeda's Iraqi affiliate.
The group has fought against the regime of Bashar al-Assad in Syria but has also been battling other rebel groups.
The newspaper had kept the kidnapping quiet until December while it contacted the captors via intermediaries. It said at that time that the kidnappers had made no demands.
"It has been a hard few months. We knew the wait would be long but you never get used to it," said the director of El Mundo's international pages, Ana Alonso Montes, on Sunday.
"You never know when the moment of liberation will come, although we never doubted it would," she told national radio.
- Reporting Syrian bloodshed -
Award-winning reporter Espinosa has been a Middle East correspondent for El Mundo since 2002 and is based in Beirut.
Like Vilanova, he has covered some of the most dangerous points in the Syrian conflict, including the siege of Homs in February 2012.
On February 22 he escaped that bloodbath in which human rights groups said 700 people were killed and thousands injured, and made it back to Lebanon a week later.
Among those killed in Homs were two other Western journalists: US reporter Marie Colvin and French photographer Remi Ochlik.
Espinosa wrote of his escape from the city, under fire among a crowd of wounded refugees, in a compelling reportage published in March 2013.
An online forum that frequently features statements from jihadists had also called on the militants to free the two.
The Honein jihadist forum said the two journalists were a "good hand for advocating our issues in Iraq and Syria, and carrying the silenced truth".
Garcia Vilanova has contributed to Agence France-Presse and other world media such as the New York Times and the Washington Post.
Media rights group Reporters Without Borders ranks Syria as the most dangerous country in the world for journalists.
A third Spanish journalist seized separately in Syria in September, Marc Marginedas, a correspondent for the Catalan daily El Periodico, was freed early this month.
French, US and Syrian journalists are among the others still missing in Syria.
----------------------------------------------------------------