Among the world's religions, views on masturbation vary widely. Some religions view it as a spiritually detrimental practice, some see it as not spiritually detrimental and others take a situational view. Among these latter religions, some view masturbation as allowable if used as a means towards sexual self-control, or as part of healthy self-exploration, but disallow it if it is done with motives they consider to be wrong, or as an addiction. A 2016 Psychology Today article stated that the more religious people are, the more likely they are to restrict their sexual fantasies, have fewer sex partners, use less pornography and express stronger disapproval of the use of sex toys.

Abrahamic religions

Biblical scholarship

Most scholars have held that there are no explicit proscriptions in the Bible about masturbation.For example:

. "The Bible presents no clear theological ethic on masturbation, leaving many young unmarried Christians with confusion and guilt around their sexuality."

, The word masturbation is never specifically mentioned in the Bible, nor are there any clear unchallenged references to masturbation. Various passages have been held to implicitly condemn or approve of masturbation, but others disagree; there is not "a clear condemnation of masturbation".

The biblical story of Onan (Genesis 38) is traditionally linked to referring to masturbation and condemnation thereof. A number of scholars have pointed out that the sexual act described by this story is coitus interruptus, not masturbation. (official Catholic tract declared free from error by a book censor and approved by a bishop.) Quote: "The Bible mentions at least one form of contraception specifically and condemns it. Coitus interruptus, was used by Onan to avoid fulfilling his duty according to the ancient Jewish law of fathering children for one's dead brother."Confirmed by The Web Bible Encyclopedia at http://www.christiananswers.net/dictionary/onan.html quote: "Some have mistakenly assumed that Onan's sin was masturbation. However, it seems clear that this is not the case. Onan was prematurely withdrawing from sexual intercourse with his new wife, Tamar. This is a form of birth control still practiced today (coitus interruptus)."Church Father Epiphanius of Salamis agrees, according to Some go further and argue that Onan's death was solely due to his refusal to fulfill the obligation of levirate marriage, rather than any sexual sin. Others argue that Onan's punishment was both for his refusal to fulfill his obligations and because of his perverse sexual act. For example, James Nelson argues that Onan's act was condemned due to the firm "procreative" accent of the Hebrew interpretation regarding sexuality, where survival of the tribe depends on abundant procreation. The story was written by a "prescientific mind" that considered the child to be contained in the sperm the same way a plant is contained in its seed. Onan's offense was therefore the deliberate destruction of human life.

Leviticus 15:16–17 says that a man who has an emission of semen should wash and be ceremonially unclean until evening. Verse 18 goes on to say that if a man and woman have intercourse, the same cleanliness rules apply. Ilona N. Rashkow states that Leviticus 15:16 "refers to the emission rather than its circumstances." According to James R. Johnson, by bringing up intercourse separately, the passage implies that the emission of semen in verses 16 and 17 occurred for the man individually. The passage may be referring to a nocturnal emission, or wet dream, rather than masturbation, but the passage is not specific. In contrast, Deuteronomy 23:9–11 explicitly specifies nocturnal emission. Johnson thus views this passage as suggesting that masturbation is a purely ceremonial cleanliness issue, and not as a matter of morality. Johnson also notes that the passage puts no more disapproval on the solitary experience than it does on intercourse.

Matthew 5:29–30, Matt. 18:6–9, and Mark 9:42–48 state that, if they cause one to sin, one should tear out one's eye and cut off one's hand or foot. Will Deming states "The sinning by eye, hand, and foot may come from a tradition of formulaic warnings against lustful gazing (by the eye), masturbation (by hand), and adultery (by 'foot', the Hebrew euphemism for genitalia)," referencing the Niddah, specifically m. Nid. 2.1 and b. Nid. 13b. In addition to the eye, Deming argues that "the hand plays a major role in lust as well through masturbation". William Loader links this to the story of Origen, where perhaps Origen read "foot" and "hand" as euphemisms for penis and castrated himself. Loader views attaching special meanings to the body parts in these passages as over-interpretation, as these passages are mainly hyperbole.

1 Thessalonians 4:3–4 reads: “What God wants is for you all to be holy. He wants you to keep away from fornication [porneia], and each of you to know how to use the body that belongs to him in a way that is holy and honorable, not giving way to selfish lust like the pagans who do not know God.” The Greek word porneia (πορνεία) is used in other New Testament passages such as Galatians 5:19–23 and has a general meaning of sexual immorality or unchastity. More generally, Paul refers to purity and contamination in 2 Corinthians 7:1. Some commentators view the word porneia as including masturbation, and see these passages as implicitly confirming the immorality of masturbation. Others disagree, holding that this passage simply condemns the pagans' then-common sexual licentiousness and promiscuity, and has no relevance to masturbation.

Romans 1:24 and 1 Corinthians 6:10 are sometimes held to refer to masturbation, but Dedek argues that they refer to sodomy and pederasty respectively.

1 Corinthians 7:3–5 has been held by some to allow masturbation in the context of marriage. The passage may imply that masturbation should not necessarily be a normal circumstance, but if for example sexual tension becomes unmanageable due to extended separation, Johnson states "masturbation would not counteract the divine purpose" with the consent of one's spouse.

Christianity

Christian denominations have different views on masturbation. Today, Roman Catholic (including Eastern Catholic), Eastern Orthodox, Oriental Orthodox and some Protestant Christians consider masturbation to be a sin. Many Protestant churches in Northern and Western Europe and some Protestant churches in Northern America and in Australia/New Zealand see masturbation as not a sin.

According to Björn Krondorfer, "Auto-erotic sex became conceivable as a distinct entity among sexual sins only when the autonomous self emerged." He goes on to cite Laqueur, "Only after the Freudian revolution...did a cultural shift occur. Masturbation was now valued as an adult, non-pathological, pleasurable activity. 'Beginning in the 1950s, picking up energy with the feminism of the 1960s and early 1970s, with the subsequent sex wars, and with the worldwide gay movement of the last quarter of the century, it would become an arena of sexual politics and for art across a wide spectrum of society...Due to this cultural change across the spectrum, even theological reassessments of masturbation as a positive sexual practice were possible – though, admittedly, rare."

Islam

In modern times, Islamic jurists have ruled masturbation () haram (forbidden) or makruh (discouraged) on the basis of Istihsan (discretion), however there is a widely cited hadith by Hasan al-Basri, Qatada ibn al-Nu'man and Al-Dahhak ibn Muzahim, that the Sahaba practiced it during the Ghazwat, which is used to form other opinions.

Another common narration is that of Ibn Abbas:

As well as that of Jabir ibn Zayd:

The minority viewpoint then formed with these narration as their basis, most notably Ahmad ibn Hanbal, and his student Ibn Qayyim al-Jawziyya, as well as Ibn Hazm, who permit masturbation as an alternative to zina (fornication), or if one is unable to buy a concubine or pursue marriage.The Lawful And The Prohibited In Islam, Yusuf Al-Qardawi – 1997The New Arab Man: Emergent Masculinities, Technologies, and Islam in the Middle East, p. 168, Marcia C. Inhorn – 2012 It used to be the majority opinion within the Zahiri and Hanbali schools of thought.

Bathing (ghusl) after any kind of seminal discharge whether through sexual intercourse, masturbation, or nocturnal emissions is considered obligatory according to all Islamic schools of jurisprudence, in order to be considered ritually pure for compulsory prayer.

Judaism

Maimonides stated that the Tanakh does not explicitly prohibit masturbation. On the matter of masturbation, the biblical story of Onan is traditionally interpreted by Jews to be about the emitting sperm outside of the vagina and condemnation thereof, applying this story to masturbation, although the Tanakh does not explicitly state that Onan was masturbating.Judaism 101: Kosher Sex Jewish law clearly prohibits male masturbation. This law is derived from the story of Onan (Gen. 38:8–10), who practiced coitus interruptus as a means of birth control to avoid fathering a child for his deceased brother. God killed Onan for this sin. Although Onan's act was not truly masturbation, Jewish law takes a very broad view of the acts prohibited by this passage, and forbids any act of ha-sh'cha'tat zerah (destruction of the seed), that is, ejaculation outside of the vagina. In fact, the prohibition is so strict that one passage in the Talmud states, "in the case of a man, the hand that reaches below the navel should be chopped off." (Niddah 13a). The issue is somewhat less clear for women. Obviously, spilling the seed is not going to happen in female masturbation, and there is no explicit Torah prohibition against female masturbation. Nevertheless, Judaism generally frowns upon female masturbation as "impure thoughts." By virtue of Onan, traditional Judaism condemns [male] masturbation.Maimonides, Commentary to the Mishnah, Sanhedrin 7:4, apud

states that any male who emits semen is considered ritually impure - whether the emission came through masturbation, nocturnal emission, or sex between married heterosexual partners. apud The traditional rabbinical interpretation of Leviticus 15 was that it applies to all sperm flows, including sperm flows due to masturbation. Other than this ritual impurity, no consequences or punishments are specified.

Even among Jewish scholars and among rabbis, it is widely disputed whether the prohibition of masturbation is a biblical prohibition or a rabbinical prohibition, since it is never explicitly mentioned in the Torah. Many Ultra-Orthodox rabbis are afraid to publicly discuss their disagreement with the traditional interpretation about it being prohibited by the Bible.

Indian and Iranian religions

Hinduism Seeking bodily pleasure is only considered condemned for those who dedicate themselves to chastity. There are no references in Hindu religious texts to suggest that masturbation itself desecrates sexual purity. For those who are dedicated to chastity, this sin is absolutely minor, and can be absolved either by taking a bath, or by worshipping the Sun, or by saying three prayers.

Buddhism

The most used formulation of Buddhist ethics are the Five Precepts. These precepts take the form of voluntary personal undertakings, not divine mandate or instruction. The third precept is "to refrain from committing sexual misconduct". However, different schools of Buddhism have differing interpretations of what constitutes sexual misconduct.