Are you worried that sometime during your life, you’ve committed the unforgivable sin?
31 “Therefore I say to you, every sin and blasphemy shall be forgiven people, but blasphemy against the Spirit shall not be forgiven. 32 And 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.
Matthew 12:31–32
As the Son of God, Jesus had the power to cast out demons through the power of the “Spirit of God” (v.28). After watching their valuable places of religious authority threatened (they’d added a lot to the Law of Moses and the Torah out of greed and self-entitlement), the Pharisees couldn’t give leave to some itinerant preacher from the backwater town of Nazareth.
While the Pharisees publically rejected the ministry of Jesus, they sought to delude the people by assigning his miracles and exorcisms to the hand of Satan. They explicitly claimed that Jesus was only able to cast out demons “by Beelzebub the ruler of the devils” (v.24). Beelzebub means “Lord of the flies”, another name for Satan. If you look at 2 Kings 1:2, you’ll see that the Greek interpretation of Baal-zebub is used. Baal was the fertility god of the Canaanites.
By asserting such a fallacious connection, the Pharisees effectively called the Lordship of Jesus, thereby God and the Holy Spirit, a lie. Jesus, of course, was quick to counter the illogicality of such a claim with sound wisdom,
Every kingdom divided against itself is laid waste; and every city or house divided against itself will not stand. 26 If Satan casts out Satan, he is divided against himself; how then will his kingdom stand? 27 If I by Beelzebul cast out demons, by whom do your sons cast them out? For this reason they will be your judges. 28 But if I cast out demons by the Spirit of God, then the kingdom of God has come upon you.”
Matthew 12:25-28
Even though the Pharisaic elders had already heard or witnessed several of Jesus’ miracles, their profound rejection of Jesus’ spiritual authority came from their hearts; it was, thereby, permanent and absolute. Therefore, they were guilty of an eternal sin.
28 Truly I say to you, all sins will be forgiven the sons and daughters of men, and whatever blasphemies they commit; 29 but whoever blasphemes against the Holy Spirit never has forgiveness, but is guilty of an eternal sin“—
Mark 3:28–29
As the only Son of God, “Truly I say to you” is an explicit manifestation, declaration and illustration of Jesus’ divine authority. this is the first of 10 times it’s stated in Mark’s Gospel (3:28; 8:12; 9:1, 41; 10:15, 29; 11:23; 13:30; 14:25, 30).
As we see in Matthew 12:31–32, anyone who attributes Jesus’ works to Satan or his minions has committed blasphemy against the Holy Spirit. The only reward they’ll receive is a first-class ticket to eternal damnation.
10 And everyone who speaks a word against the Son of Man, it will be forgiven him; but the one who blasphemes against the Holy Spirit, it will not be forgiven him.
Luke 12:10

I don’t often quote John Calvin, but his exegesis of this verse is somewhat helpful:
Already we begin to perceive that the reason why blasphemy against the Spirit exceeds other sins is not that the Spirit is higher than Christ [for it is as much united with Christ as it is with God Himself], but that those who rebel, after that the power of God has been revealed, cannot be excused on the plea of ignorance.
Besides, it must be observed that what is here said about blasphemy does not refer merely to the essence of the Spirit, but to the grace which He has bestowed upon us. [Therefore], those who are destitute of the light of the Spirit, however much they may detract from the glory of the Spirit, will not be held guilty of this crime.”
Calvin, John. Commentary on Luke. Titus Books. Kindle Edition

What I find helpful to understand here is, “those who are destitute of the light of the Spirit, however much they may detract from the glory of the Spirit, will not be held guilty of this crime.” So, you see, the gravest sin one can commit is only committable by a committed believer. This is very logical, for God has already warned his people,
8 Do not harden your hearts, as at Meribah,
Psalm 95:8-11
As in the day of Massah in the wilderness,
9 “When your fathers tested Me,
They tried Me, though they had seen My work.
10 “For forty years I loathed that generation,
And said they are a people who err in their heart,
And they do not know My ways.
11 “Therefore I swore in My anger,
Truly they shall not enter into My rest.”
7Therefore, just as the Holy Spirit says,
Today, if you hear His voice,
Hebrews 3:7-12
8 Do not harden your hearts as when they provoked Me,
As in the day of trial in the wilderness,
9 Where your fathers tried Me by testing Me,
And saw My works for forty years.
10 “Therefore I was angry with this generation,
And said, ‘They always go astray in their heart,
And they did not know My ways’;
11 As I swore in My wrath,
‘They shall not enter My rest.’
We see above that the unknown author of Hebrews is recounting the words of King David in Psalm 95. In this passage, the author was warning the Jews that if they’d lamented over and feared the punishment bestowed upon those breaking the Law of Moses, faithlessness to the good news of Jesus Christ is infinitely worse.
The primary lesson of this is verse is that all who hear the voice of God should not be defiant against His Word. All those who do will be subjected to divine judgement; they won’t enter into God’s place of rest.
4 For it is impossible, in the case of those who have once been enlightened and have tasted of the heavenly gift and have been made partakers of the Holy Spirit, 5 and have tasted the good word of God and the powers of the age to come, 6 and then have fallen away, to restore them again to repentance, since they again crucify to themselves the Son of God and put Him to open shame.
Hebrews 6:4-6
If you browse through the theological archives, you’ll see that Hebrews 6:4-20 has beheld numerous interpretations. To save us all time, I’ll briefly talk about the most probable.
The epistle to the Hebrews speaks about an unfulfilled possibility rather than a particular event. This warning against apostasy is a rhetorical device that calls the readers to maintain the same level of spiritual vigour, harmony, love of Christ, and faithful stewardship they’d shown in the past. The author was encouraging the readers to mature in their faith.
26 For if we go on sinning willfully after receiving the knowledge of the truth, there no longer remains a sacrifice for sins, 27 but a terrifying expectation of judgment and the fury of a fire which will consume the adversaries.
28 Anyone who has ignored the Law of Moses is put to death without mercy on the testimony of two or three witnesses. 29 How much more severe punishment do you think he will deserve who has trampled underfoot the Son of God, and has regarded as unclean the blood of the covenant by which he was sanctified, and has insulted the Spirit of grace? 30 For we know Him who said, “Vengeance is Mine, I will repay.” And again, “The Lord will judge His people.” 31 It is a terrifying thing to fall into the hands of the living God.
Hebrews 10:26-31
This passage is a very stern warning to believers. If, after accepting the good news (the gospel) of Jesus Christ, a foolish believer turns their back on and slanders Christ’s gift of the Holy Spirit, all hope is lost. The only thing such a person can expect is infinite separation from God and everlasting terror.
16 If anyone sees his brother or sister 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 sin leading to death; I am not saying that he should ask about that.
1 John 5:16
The first thing we need to appreciate in this verse is the word “death“. The apostle John isn’t talking about the death of our body, the inevitable and eventual conclusion to our earthly lives since the fall. Instead, he’s talking about spiritual death: one’s eternal separation from God.
In conclusion, the “sin leading to [such] death” is apostasy. This sin is the result of a believer falling away from and denying the truth of Christ. Indeed, John closes this verse with a very sombre reality: as such people are subject to God’s righteousness and judgement, there’s really no point praying for an apostate.
It has always seemed to me that there is something about blaspheming the Spirit, as Jesus intended us to understand it, that has brought a person to the point where they are sinning in such a way that they are unwilling and unable to repent and believe. That is the way I am putting the two together.
Can a Christian Blaspheme the Holy Spirit? John Piper, Founder & Teacher, desiringGod.org