In Islam as a general opinion it is haram, prohibited. The following verses are often cited as evidence for it:
23:5 "And they who guard their private parts"
23:6 "Except from their wives or those their right hands possess, for indeed, they will not be blamed -"
23:7 "But whoever seeks beyond that, then those are the transgressors -"
But many Muslim scholars say that these verses don't explicitly prohibit masturbation, nor do any other verses in the Qur'an - or even the ahadith. Which is why some scholars consider masturbation to be makrooh, disliked, rather than haram, prohibited.
23:5 "And they who guard their private parts"
23:6 "Except from their wives or those their right hands possess, for indeed, they will not be blamed -"
23:7 "But whoever seeks beyond that, then those are the transgressors -"
But many Muslim scholars say that these verses don't explicitly prohibit masturbation, nor do any other verses in the Qur'an - or even the ahadith. Which is why some scholars consider masturbation to be makrooh, disliked, rather than haram, prohibited.