First let's look at what 1 Corinthians 15:29 1 Corinthians 15:29Else what shall they do which are baptized for the dead, if the dead rise not at all? why are they then baptized for the dead?
American King James Version×says: "Otherwise, what will they do who are baptized for the dead, if the dead do not rise at all? Why then are they baptized for the dead?"
The meaning is not clear from this verse itself, nor is there any similar reference in the rest of the New Testament. Some people interpret this to mean that members of the Corinthian church underwent baptism for dead people who were never converted. At least one large modern denomination follows this practice, believing that baptism on behalf of unconverted people somehow helps prepare them for a future resurrection. But the Bible says nothing about such "preparation" for resurrection. A dead person doesn't need baptism by proxy in order for God to resurrect him. That's not the purpose of baptism at all.
The context of Paul's words shows his purpose to be substantiating and verifying the doctrine of the resurrection. His meaning seems to be, "Why seek baptism (for yourself) if there is no hope of your resurrection to follow?" That is, one of the reasons Christians seek baptism is for the hope of the dead—which is the resurrection. Through baptism, they have the hope that God will one day bring them back to life—to eternal life in His Kingdom.
This explanation is consistent with the rest of the Scriptures. In Romans 6 the apostle Paul likened baptism to burial after death. Baptism is the symbolic burial of the old self, performed after a person becomes aware of and "dies" to his sin (Romans 6:1-6 Romans 6:1-6  What shall we say then? Shall we continue in sin, that grace may abound?
 God forbid. How shall we, that are dead to sin, live any longer therein?
 Know you not, that so many of us as were baptized into Jesus Christ were baptized into his death?
 Therefore we are buried with him by baptism into death: that like as Christ was raised up from the dead by the glory of the Father, even so we also should walk in newness of life.
 For if we have been planted together in the likeness of his death, we shall be also in the likeness of his resurrection:
 Knowing this, that our old man is crucified with him, that the body of sin might be destroyed, that from now on we should not serve sin.
American King James Version×).
An additional truth that invalidates the idea of baptism for someone else is the fact that no one can repent for anyone else. Consequently, baptism on behalf of another person—whether the person is alive or dead—could have no bearing whatsoever on that other person's spiritual standing. Nowhere does the Bible suggest that the Church should or could baptize one person on behalf of anyone else, living or dead.
Concern for people who have died without being converted is a valid one, but God has a plan for them. The Bible reveals that God intends to bring to life (resurrect) all those who died without understanding the truth and give them an opportunity for salvation.
For more information, please read our booklet The Road to Eternal Life.