In separate statements on Friday, the two governments said the prisoner release would take place on Monday.
New Delhi will release 152 Pakistani prisoners, while Islamabad would free 435 Indian nationals, including 371 fishermen and 64 others, the statements said.
"The government of Pakistan views this matter as a humanitarian issue, therefore, it has been decided to release all Indian prisoner in its jails whose national status has been confirmed," a foreign ministry statement said in Islamabad.
The Indian fishermen have been held in different jails here since last year for illegally fishing in Pakistani waters.
At talks between home ministry officials at the end of last month in New Delhi, both sides agreed to set free prisoners who had finished their jail terms and had travel documents.
An Indian home ministry official said the Pakistani prisoners will be freed at the Wagah border point on Monday after officials in the Pakistan High Commission here had confirmed their nationality.
Other Pakistani civilian prisoners who had yet to complete their prison sentences would also be provided consular access, he added.
Meanwhile, Indian Foreign Secretary Shyam Saran said New Delhi had given Islamabad all the information it had gathered about Indian national Sarabjit Singh, who has been sentenced to hang in Pakistan on bombing and spying charges.
He said letters from Singh's family appealing for a pardon had also been given to Pakistani officials.
Islamabad and New Delhi are currently negotiating over the fate of Singh. Pakistan has denied an Indian newspaper report that it assured New Delhi he would be spared.
The South Asian neighbours have held several rounds of peace talks aimed at resolving eight core disputes, including the Himalayan state of Kashmir which is divided between the two neigbours.
Pakistan's President Pervez Musharraf and Indian Prime Minister Manmohan Singh are set to meet on the sidelines of a UN conference next week.