Blasphemy in old Jewish law is to revile or curse God, or the king, who was God’s representative. It means intentional indignity offered to God or sacred things. The term can be applied to such sins as cursing God or willfully degrading things relating to God. It is also attributing some evil to God, or denying Him some good that we should attribute to Him. God was very clear in giving the 10 Commandments that the Israelites (and we) were/are not to “take the name of the Lord thy God in vain” (Ex. 20:7).
In Matthew 12:31, this case of blasphemy, however, is a specific one, called “the blasphemy against the Holy Spirit”. In Matthew 12:31-32, the Pharisees, had witnessed irrefutable proof that Jesus was working miracles in the power of the Holy Spirit, but had claimed instead that the Lord was possessed by the demon “Beelzebub” (Matthew 12:24). In this passage Jesus not only warns His hearers that , “He who is not with me is against me…(12:30), but he goes on to say that anyone who credits the work of God to the devil is in danger of committing the unforgivable sin, that is blaspheming the Holy Spirit of God (verse 31).
After Jesus’ baptism, He began His ministry and started performing miracles. He did His miracles by the power of the Holy Spirit which had come upon Him at His baptism. The Pharisees–who knew that Jesus' miracles validated His words and ministry (see John 11:45-48)–were attempting to discredit Jesus' Messiahship by saying His works were by the devil and not by the Holy Spirit. Therefore, when the Pharisees accused Jesus of casting out demons by the power of Satan, they were blaspheming the Holy Spirit (the power of God) through which Jesus performed His miracles.
When people harden their hearts and knowingly oppose God’s holy power, those people are in danger of committing the unforgivable sin. That opposition strikes at the very heart of the redemptive work of God in Christ. It strikes at the very nature of Jesus' ministry of redemption, testimony, and teaching. Jesus was ministering in the power of the Holy Spirit, fulfilling the divine plan of God to provide a sacrifice for our sins (John 3:16; I John 4:10). The Pharisees were attributing this to demonic activity. This was a great blasphemy.
You might be worried that you have committed the sin that can’t be forgiven, but if you are worried about that, then you probably haven’t committed it. If you are worried, you will probably make the necessary changes in your life so that you wouldn’t be in danger of the unpardonable sin.