Mt 12:31 – 32
31 Therefore I say to you, any sin and blasphemy shall be forgiven people, but blasphemy against the Spirit shall not be forgiven.
32 Whoever speaks a word against the Son of Man, it shall be forgiven him; but whoever speaks against the Holy Spirit, it shall not be forgiven him, either in this age or in the age to come.
29 but whoever blasphemes against the Holy Spirit never has forgiveness, but is guilty of an eternal sin
Blasphemy of the Holy Spirit was committed when someone witnessed Jesus perform a miracle, and then attributed it to the power of the Devil. This indicated a heart so hardened that the individual was unable to respond to the teaching of the gospel. Anyone who does not accept the gospel will be lost.
1 John 5:16-17
16 If anyone sees his brother committing a sin not leading to death, he shall ask and God will for him give life to those who commit sin not leading to death. There is a sin leading to death; I do not say that he should make request for this.
17 All unrighteousness is sin, and there is a sin not leading to death.
I believe that any sin that one refuses to repent of is a sin leading to death. In the context here, the sin leading to death is the refusal to accept Jesus as the son of God. This was a Gnostic problem in the 1st Century. Let’s read the context.
1 John 5:10-13
10* The one who believes in the Son of God has the testimony in himself; the one who does not believe God has made Him a liar, because he has not believed in the testimony that God has given concerning His Son.
11* And the testimony is this, that God has given us eternal life, and this life is in His Son.
12* He who has the Son has the life; he who does not have the Son of God does not have the life.
13* These things I have written to you who believe in the name of the Son of God, so that you may know that you have eternal life.