Using Short Musical Sound Effects in Websites or Applications
Question: when I program a university website, sometimes the interactive buttons I use are accompanied by a musical sound effect when clicked. For example, when the user clicks the “purchase” button, a sound like a coin ring plays. This sound includes musical instruments, but it only plays for a short time and is not used as background music for the application. What is the ruling based on the Qur’an and the Sunnah, along with the statements of the scholars.
Summary:
Sound effects that contain music are prohibited, whether long or short, background or triggered by clicking. Non musical sounds, however, are permissible.
Answer:
In the name of Allah, all praise is due to Allah, and may Peace and Blessings be upon the Messenger of Allah (ﷺ)
First: The basic ruling on musical instruments
It is established that the Prophet ﷺ said
From the Sunnah:
- Sahīḥ al-Bukhārī: 5590Narrated by Abu ʿAmir (or Abu Malik) al-Ashʿarī (may Allah be pleased with him):
"that he heard the Prophet (ﷺ) saying, "From among my followers there will be some people who will consider illegal sexual intercourse, the wearing of silk, the drinking of alcoholic drinks and the use of musical instruments, as lawful..."
This hadith indicates that musical instruments are prohibited, and that considering them lawful is a sign of deviation.
Second: The ruling on short musical sounds in applications Sounds produced by musical instruments, even if brief or short, fall under the general prohibition of musical instruments. The ruling is not based on the length of the sound, but on the fact that it originates from a musical instrument. However, if the sound effect is merely a neutral tone or click that is not musical, such as a light tapping, ticking, or neutral electronic beep, then there is no harm in it.
From the Scholars:
- Majmuʿ al Fatawa 11/535
Ibn Taymiyyah رحمه الله said, musical instruments are all instruments of amusement, and there is no disagreement about this among the linguists, and when musical instruments are included in the hadith, they are prohibited
- Ighathat al Lahfan 1/260
Ibn al Qayyim رحمه الله said, musical instruments were permitted only by those whose disagreement is not considered, and what is forbidden among them is forbidden whether small or great
- Al Liqāʾ al Maftūḥ, Tape No. 54
Shaykh Ibn ʿUthaymeen رحمه الله said, everything that is called music or musical instruments is haram, even if one listens to it only for a moment
The preferred view: The stronger opinion is that using sound effects with a musical tone, even for a few seconds, is not permissible, because they are among the instruments that the text prohibited. But if the programmer needs to add a sound effect for alert or interaction, he should use permissible non musical sounds, such as clicking sounds, electronic tones, or digital echoes that do not involve musical instruments. Examples of permissible sounds that can be used in websites or applications instead of musical sounds: 1. Click sounds • A sound like a light tap or “tick” when pressing a button. • Usually used to confirm that the button responded. 2. Notification pings • A short neutral sound such as “bip” or “ton.” • Similar to a phone alert without music. 3. Digital beeps • Clean electronic tones, such as those of computers or old 8 bit games. • Suitable for educational or interactive applications. 4. Swipe or transition sounds • A light movement sound for switching between pages or opening a new window. • Designed as a natural effect, not a musical one. 5. Success or completion sounds • A short electronic “ding” or simple beep. • Used when completing a purchase or registration. 6. Error or alert sounds • A quick “buzz” or “ton ton.” • Alerts the user to a mistake without a musical melody.
And Allah knows best.
← Back to Questions