There are many different views on this topic, Gil Student cites some of them here. Below is my personal opinion on this weighty topic.
I think such an exchange is forbidden. While the mitzvah to redeem captives is extremely important, the Mishnah says they cannot be redeemed for more than their value. The gemara gives 2 explanations for this - either because its too much of a burden on the tzibbur, or it will encourage future kidnappings of Jews. If they see that Jews pay extra to free their captives, they will try to capture more Jews. Chazal recognized this issue and decreed one should "foresees the consequences" and leave one Jew in captivity so as not to cause more Jews to suffer in the future.
In that case, the captors are not looking to kill Jews, they just want to make money. Yet the halacha says one cannot pay them extra money so as not to encourage them in the future. Surely if the captors are sworn enemies of the Jews who want to kill them and destroy their country, we cannot ransom a captive more than his cost! How can we give aid to them when it will just be used in their war against the Jews? To release multiple terrorists for one captive is not a "fair trade" and is more than the cost. And this is much worse than giving the captors money, since the very terrorists released often go back to committing terrorism themselves against the Jews. In addition, uneven trades strengthens the hand of the enemy by handing them a "victory" that they can use to gain more power.
Since Israel started doing these trades it has caused nothing but harm. The encouragement given to the terrorists helped cause both Lebanon wars and provided the terrorists with much manpower. Hundreds of Israelis have been killed by terrorists released in these trades.
These swaps also harm morale since soldiers risk their lives to capture these terrorists and then see a thousand released for one person. A soldier who goes to war knows he's risking his life for his country and may be killed in battle. The fact that he is captured does not mean that hundreds of future lives must be risked to save him. Instead, the enemy should be hit back with force, so they know kidnappings will not help them.