Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:49:11

O you who have believed, let not a people ridicule ˹another˺ people; perhaps they may be better than them; nor let women ridicule ˹other˺ women; perhaps they may be better than them. And do not insult one another and do not call each other by ˹offensive˺ nicknames. Wretched is the name of disobedience after ˹one's˺ faith. And whoever does not repent - then it is those who are the wrongdoers.  

O you who believe, do not let any people, that is, any men among you, deride (yā ayyuhā’lladhīna āmanū lā yaskhar … ˹to the end of˺ the verse, was revealed regarding the ˹Banū˺ Tamīm delegation when they derided the poor among the Muslims, like ‘Ammār ˹b. Yāsir˺ and Suhayb ˹al-Rūmī˺; al-sukhriya means ‘scorn’ and ‘disdain’) another people: who may be better than they are, in God’s sight; nor let any women, from among you, deride ˹other˺ women who may be better than they are. And do not defame one another, do not cast aspersions ˹on others˺ and hence have aspersions cast on you, that is, let none among you denigrate another; nor insult one another by nicknames, do not call another by a nickname which he detests, such as ‘O degenerate one!’ or ‘O disbeliever!’. Evil is the name, mentioned out of mockery, derision and mutual reviling, of immorality after faith! (al-fusūqu ba‘da’l-īmāni substitutes for al-ismu, ‘the name’, to indicate that it ˹such naming of others˺ is ‘immorality’ as it is ˹an action which is˺ usually repeated). And whoever does not repent, of such ˹immorality˺, those — they are the evildoers.
القرآن:٤٩:١١

يَا أَيُّهَا الَّذِينَ آمَنُوا لَا يَسْخَرْ قَوْمٌ مِنْ قَوْمٍ عَسَىٰ أَنْ يَكُونُوا خَيْرًا مِنْهُمْ وَلَا نِسَاءٌ مِنْ نِسَاءٍ عَسَىٰ أَنْ يَكُنَّ خَيْرًا مِنْهُنَّ ۖ وَلَا تَلْمِزُوا أَنْفُسَكُمْ وَلَا تَنَابَزُوا بِالْأَلْقَابِ ۖ بِئْسَ الِاسْمُ الْفُسُوقُ بَعْدَ الْإِيمَانِ ۚ وَمَنْ لَمْ يَتُبْ فَأُولَٰئِكَ هُمُ الظَّالِمُونَ  

{يا أيها الذين آمنوا لا يسخر} الآية، نزلت في وفد تميم حين سخروا من فقراء المسلمين كعمار وصهيب، والسخرية: الازدراء والاحتقار {قوم} أي رجال منكم {من قوم عسى أن يكونوا خيرا منهم} عند الله {ولا نساء} منكم {من نساءٍ عسى أن يكنَّ خيرا منهن ولا تلمزوا أنفسكم} لا تعيبوا فتعابوا، أي لا يعب بعضكم بعضا {ولا تنابزوا بالألقاب} لا يدعون بعضكم بعضا بلقب يكرهه، ومنه يا فاسق يا كافر {بئس الاسم} أي المذكور من السخرية واللمز والتنابز {الفسوق بعد الإيمان} بدل من الاسم أنه فسق لتكرره عادة {ومن لم يتب} من ذلك {فأولئك هم الظالمون}.