Writer Magnus Falkehed and photographer Niclas Hammarström were kidnapped in November while on assignment in the country, which has imploded in the past years.
After almost two months incommunicado, the two men will now be able to rejoin friends and family at home.
"Both journalists, Magnus Falkehed and Niclas Hammarström, are free and can reunite with their relatives," foreign ministry spokesman Erik Wirkensjö told the Dagens Nyheter newspaper, for whom Falkehed has worked.
"They are being assisted by our embassy personnel in Beirut."
Falkehed was freed , three days after Hammarström was released, according to a telephone interview Hammarström gave to the Aftonbladet newspaper.
He said their captivity was harrowing.
"The worst was the uncertainty," Hammarström said. "It's a huge relief to finally be free."
Falkehed told the daily Dagens Nyheter:
"I feel good but a little exhausted."
Details of their release were not given, and little was revealed of their captors.
Hammarström said he and Falkehed were kept mostly separate in dark cellars, with little food and access to a toilet just once per day. An escape bid early on ended with both being recaptured — and with Hammarström being shot in the left leg. After that, they were blindfolded.
The captors brought in a doctor to treat the photographer's wound.
"I thought constantly of my family in Sweden," said Hammarström, who added that he had lost a lot of weight.
The foreign ministry did not issue any comment about what if any diplomatic negotiation or action had been taken to have the two reporters released. Nor would its spokesman specify when Falkehed and Hammarström regained their freedom.
Swedish Foreign Minister Carl Bildt welcomed their release on Twitter.
Great relief that the two Swedish journalists are out of Syria. But unfortunately there are still others held against their will.
— Carl Bildt (@carlbildt) January 8, 2014
The two men were reported missing on , when the Swedish foreign ministry said the pair appeared to have been kidnapped.
Dozens of journalists have gone missing in Syria since the conflict began in March 2011, with both regime supporters and opponents accused of abductions.
Syria is the deadliest place in the world for journalists, according to media watchdogs. Reporters without Borders says 27 journalists have been killed in the country since the conflict began.