"I welcome the fact that Peter Dahlin can now be reunited with his family in Sweden. This is the result of close contacts between the Swedish foreign ministry and Chinese representatives," Foreign Minister Margot Wallstrom said in a statement.
Dahlin, who worked for the Chinese Urgent Action Working Group, disappeared on January 4 as he prepared to board a flight to Thailand, and appears to have been caught up in a crackdown on human rights lawyers.
State broadcaster CCTV last week aired footage of a dazed and harried looking Dahlin apologising to China for his alleged actions.
Another Swedish national, China-born Hong Kong bookseller Gui Minhai, disappeared from Thailand late last year before reappearing on Chinese national television in police custody.
More From This Section
He confessed to a mainland drink-driving offence dating back years and said he did not want Stockholm to interfere with his case.
Wallstrom said she remained "greatly concerned" about Gui.
"Our efforts to get a clear picture of his situation and the possibility to visit him continue with undiminished force," she said.
Beijing only rarely accuses foreigners of endangering state security, a crime which can involve a heavy sentence.
While forced public confessions are an old practice in Communist China, there has been a resurgence of such incidents since President Xi took power in 2012.
The European Union's ambassador to China, Hans-Dietmar Schweisgut, had called Dahlin's arrest and televised confession "part of a worrying trend and call into question China's respect for the rule of law and for its international human rights obligations.