Before you decide to disclose this struggle to your spouse, seek wisdom from God (James 1:5, Proverbs 3:5–6). There is no blanket answer for this question.
I have a pornography addiction. Do I need to tell my spouse?
James 5:16 tells us, "confess your sins to one another and pray for one another, that you may be healed. The prayer of a righteous person has great power as it is working." If you are caught in the struggle of pornography addiction, confession to a Christian believer is essential. There are many programs which can help you overcome this sin. Many churches offer help and seeing a good, biblical counselor will help you as well.
God intends us to be in relationships (Genesis 2:18) and sex is a special gift from God for procreation and for pleasure—but God intends for sex to be between a married man and woman only.
Sexual addiction, including regular viewing of pornography, is considered an "intimacy disorder." Robert Weiss, a sexual addiction expert, defines it this way: "the inability to find, tolerate, or stay in relationships that involve the risks that come with being fully known."
However, God made us social—He intends us to interact and act with others. Weiss says, "We all need healthy relationships for our survival—it is that important. We do not do well alone."
For our relationship with our spouse, it is best to be completely open about who we are: the good, the bad, and the ugly. Hiding any secrets from our spouse is detrimental to our marriage. We should trust our spouse with our entire self.
Spouses know when something is wrong in the relationship. When one spouse does confess use of porn, the other spouse usually knew something was wrong and often blamed themselves. This can cause even more pain and separation in the relationship that will have to be worked through to heal.
Many spouses find out about porn use without a confession. This discovery causes even more trauma and pain and feels like an infidelity. The longer the secret was kept, the more pain is caused. Some of this pain can be alleviated by telling a spouse and going through a recovery and reconciliation process together.
Seek God's wisdom (James 1:5) and know there are some marriages that could suffer greatly from such a confession—such as when a spouse is psychologically or emotionally challenged or if your marriage is suffering from another crisis. Not disclosing your porn use to your spouse at this time does not mean you should not seek help.
Pornaddiction.com offers some good counsel and resources. You should also seek help through a local church or Christian counseling service.
Is pornography a sin?
What practical steps can I take to overcome an addiction to internet porn?
In marriage how do the two become one flesh?
What does the Bible teach about marriage?
What are biblical steps to restore a marriage?
Truth about Marriage