Their lawyer, Nafis Siddique, told reporters that the two would still have to pay a fine of 200,000 rupees ($3500) each.
"We will pay the fine by today and hopefully both of them will leave sometime today or early tomorrow," Siddique said.
Marc Epstein and Jean-Paul Guilloteau, both from the French weekly L'Express, were arrested on 17 December after visiting the southwestern city of Quetta, the capital of Baluchistan province, while researching a story on the Taliban.
Their Pakistani assistant, Khawar Mahdi Rizvi, was also arrested for travelling with them to Quetta and he is still in police custody.
Judge Sayyid Zawaar Husayn Jafri waived the jail sentence on the journalists after government lawyers raised no objections. But the judge doubled the fine to 200,000 rupees each from 100,000 rupees each in the original sentence.
Mahmud Alam Rizvi, a government lawyer, said the court had "modified the sentence from six months to one week."
"They were set free as they already spent a week in jail," he said, adding that the period the journalists remained in police custody was considered a part of their time in prison.
Court officials said diplomats from the French consulate and officials from Pakistan's foreign ministry facilitated the release of the journalists.
The two were initially sentenced
to six months in prison
"The prosecution has not pursued the case after hectic diplomatic moves and also decided not to oppose the waiver of the jail sentence," a court official said.
Epstein, escorted by officials from the French consulate in Karachi, told reporters after the court ruling he was hoping to see his family soon.
"We would like to take this opportunity to say to loved ones that after today's judgment we will see you soon," he said in French through a translator.
The French journalists were convicted last week, when they pleaded guilty to travelling to Quetta without obtaining permission.
But on Saturday, judge Nuzhat Ara Alvi suspended the sentences for a week and asked the two to go to a higher court to appeal against the judgment.
According to news reports, the journalists were working on a documentary about Afghanistan's former Taliban regime and were checking reports that members of the hardline militia had been regrouping in Quetta and other Pakistani towns.
"I think that the foreign journalists who come to Pakistan, and they are most welcome to come to Pakistan, they must respect the code of conduct in letter, in spirit and they must respect Pakistani laws. We are glad this episode is behind us"
Spokesman, Pakistan Ministry of Foreign Affairs
Investigating officials said the journalists, who arrived in Pakistan on 7 December, had visas only for Karachi, the eastern city of Lahore and the capital, Islamabad, but they had taken pictures in "prohibited areas".
Their arrest drew criticism from international human rights and media groups, which called for their release.
Foreign Ministry spokesman Masud Khan told a news conference he was happy the episode was over.
"I think that the foreign journalists who come to Pakistan, and they are most welcome to come to Pakistan, they must respect the code of conduct in letter, in spirit and they must respect Pakistani laws. We are glad this episode is behind us," he added.