Short answer
No. You carry no sin for music that reaches your ears without your choice, in a shop, a taxi, a school or a workplace. The Hanafi scholars separate hearing from listening: the sin is in choosing to listen and enjoy it. Avoid it when you easily can, but you do not have to leave your job or stop shopping.
Hearing (sama') music without intention carries no sin. Deliberately listening (istima') to it is haram. Move away or turn your attention elsewhere when that is easy.
The four schools agree on this.
Explanation
Ibn Abidin and other Hanafi scholars draw a clear line. Listening on purpose, sitting to enjoy music, or choosing a place because of its music is sinful. A sound that reaches you while you go about your lawful business is not. Allah does not hold a soul responsible beyond its ability, and the Prophet ﷺ said that Allah has excused his ummah for mistakes, forgetfulness and what they are forced into.
Common situations:
- Shops, malls, gyms, taxis: no sin. Do your business and keep your attention on other things.
- Ads and videos online: mute or skip them when you can.
- Work radio or a colleague's speaker: you can ask politely to lower it, or wear earphones with Quran or a lecture.
- Music class at school: ask for an exemption or another task where possible. What you are required to sit through is not counted against you, though you should not join in playing.
- Family weddings with music: attend the nikah and the meal, keep ties, and step away from the music part when you can.
The believers described in the Quran turn away from idle talk when they hear it, without making a scene. That is the spirit here: avoid what you easily can, stay polite, and do not let waswasa (anxious doubts) make you think every song in a supermarket is a sin on your record. The four schools agree that what is beyond your control carries no blame.
The evidence
Quran, Surah Al-Baqara 2:286
لَا يُكَلِّفُ ٱللَّهُ نَفْسًا إِلَّا وُسْعَهَا ۚ لَهَا مَا كَسَبَتْ وَعَلَيْهَا مَا ٱكْتَسَبَتْ ۗ رَبَّنَا لَا تُؤَاخِذْنَآ إِن نَّسِينَآ أَوْ أَخْطَأْنَا ۚ رَبَّنَا وَلَا تَحْمِلْ عَلَيْنَآ إِصْرًۭا كَمَا حَمَلْتَهُۥ عَلَى ٱلَّذِينَ مِن قَبْلِنَا ۚ رَبَّنَا وَلَا تُحَمِّلْنَا مَا لَا طَاقَةَ لَنَا بِهِۦ ۖ وَٱعْفُ عَنَّا وَٱغْفِرْ لَنَا وَٱرْحَمْنَآ ۚ أَنتَ مَوْلَىٰنَا فَٱنصُرْنَا عَلَى ٱلْقَوْمِ ٱلْكَٰفِرِينَ ﴿٢٨٦﴾
Allah does not charge a soul except [with that within] its capacity. It will have [the consequence of] what [good] it has gained, and it will bear [the consequence of] what [evil] it has earned. "Our Lord, do not impose blame upon us if we have forgotten or erred. Our Lord, and lay not upon us a burden like that which You laid upon those before us. Our Lord, and burden us not with that which we have no ability to bear. And pardon us; and forgive us; and have mercy upon us. You are our protector, so give us victory over the disbelieving people."
You are not blamed for what you cannot avoid.
Quran, Surah Al-Qasas 28:55
وَإِذَا سَمِعُوا۟ ٱللَّغْوَ أَعْرَضُوا۟ عَنْهُ وَقَالُوا۟ لَنَآ أَعْمَٰلُنَا وَلَكُمْ أَعْمَٰلُكُمْ سَلَٰمٌ عَلَيْكُمْ لَا نَبْتَغِى ٱلْجَٰهِلِينَ ﴿٥٥﴾
And when they hear ill speech, they turn away from it and say, "For us are our deeds, and for you are your deeds. Peace will be upon you; we seek not the ignorant."
Believers turn away from what is sinful when it reaches them, calmly and without harshness.
Sunan Ibn Majah 2045
Graded sahih... إن الله وضع عن أمتي الخطأ والنسيان وما استكرهوا عليه ...
"Allah has lifted from my ummah the burden of mistakes, forgetfulness and what they are forced into."
Hearing music you did not choose is not counted as a sin.
Where the ruling is recorded
- Radd al-Muhtar (Ibn Abidin), Kitab al-Hazr wa al-Ibaha. Explains that the sin is in deliberate listening, not in hearing a sound that comes without intention.
This answer is pending review by the scholars on our team. Quran translation by Sahih International. Hadith Arabic from the standard editions of the six books and the Muwatta, with gradings as recorded there; the English is our own rendering. Spotted a mistake? Tell us.