When a muslim hears thats someone has died, this is the most common thing that is said:

إِنَّا لِلَّهِ وَإِنَّا إِلَيْهِ رَاجِعُونَ

Inna Lillahi wa inna ilayhi raji'un

"Indeed we belong to Allah, and indeed to Him we will return."
innā Indeed, we
lillahi belong to Allah
wa-innā and indeed we
ilayhi towards Him
rājiʿūna will return.

This is the most common thing people in Islam say when someone dies. You'll hear people say it, you'll see pictures of the verse from the Qu'ran being sent around and it'll travel accross messaging mediums such as WhatsApp.

Feel free to copy and paste it if  you have just learned that someone has died.

Inna Lillahi wa inna ilayhi raji'un

For example if someone messages you either privately, in a group chat or on social media, the first you can say is this. But in this age of copy and paste a lot of young Muslims don’t know what it means even though they are spreading it,  so I encourage you to also send the meaning.

"Indeed we belong to Allah, and indeed to Him we will return."

Understanding that we are all created by and belong to Allah in the first place should help you come to terms with the fact that everyone will one day return to him, death is inevitable and normal.

Where does this come from?

This is directly from the Qu'ran, in the second Surah - Al-Baqarah.

It is part of a verse, which in full reads:

الَّذِينَ إِذَا أَصَابَتْهُم مُّصِيبَةٌ قَالُوا إِنَّا لِلَّهِ وَإِنَّا إِلَيْهِ رَاجِعُونَ

Allatheena itha asabat-hummuseebatun qaloo inna lillahi wa-innailayhi rajiAAoon

Who, when disaster strikes them, say, "Indeed we belong to Allah, and indeed to Him we will return."

Qu'ran Surah Al-Baqarah [2:156]

As the verse implies, you can also use it in scenarios other than when someone dies in Islam. In fact, it can be used whenever a disaster or something terrible happens.


You can also remind the bereaved of the virtues of patience, make dua for the deceased to reach the highest heaven and make dua for their grieving family to find patience and peace.

After all, when someone has died, their families and loved one will need all the support they can get to cope with great grief.  What better way than Islam, which has plenty of reassurances, guidance and examples.


Duas


For example here's a dua you can say for someone who has passed away:

اللهُـمِّ اغْفِـرْ لِـ-فُلاَنٍ (باسـمه)وَارْفَعْ دَرَجَتََـهُ فِي المَهْـدِيّيـنَ ، وَاخْـلُفْـهُ في عَقِـبِهِ في الغَابِِـرِينَ، وَاغْفِـرْ لَنَا وَلَـهُ يا رَبَّ العـالَمـين، وَافْسَـحْ لَهُ في قَبْـرِهِ وَنَـوِّرْ لَهُ فِيهِ

Allaahummaghfir li (name of the person) warfa' darajatahu fil-mahdiyyeena, wakhlufhu fee 'aqibihi fil-ghaabireena , waghfir-lanaa wa lahu yaa Rabbal-'aalameena, wafsah lahu fee qabrihi wa nawwir lahu feehi

O Allah, forgive [name of the person] and elevate his station among those who are guided. Send him along the path of those who came before, and forgive us and him, O Lord of the worlds. Enlarge for him his grave and shed light upon him in it.

Muslim 2:634


Here are a couple of verses of the Qur'an you can recite during condolences:

كُلُّ نَفْسٍ ذَائِقَةُ الْمَوْتِ ۗ وَإِنَّمَا تُوَفَّوْنَ أُجُورَكُمْ يَوْمَ الْقِيَامَةِ ۖ فَمَن زُحْزِحَ عَنِ النَّارِ وَأُدْخِلَ الْجَنَّةَ فَقَدْ فَازَ ۗ وَمَا الْحَيَاةُ الدُّنْيَا إِلَّا مَتَاعُ الْغُرُورِ

Kullu nafsin tha-iqatu almawtiwa-innama tuwaffawna ojoorakum yawma alqiyamatifaman zuhziha AAani annari waodkhilaaljannata faqad faza wama alhayatu addunyailla mataAAu alghuroor

Every soul will taste death, and you will only be given your [full] compensation on the Day of Resurrection. So he who is drawn away from the Fire and admitted to Paradise has attained [his desire]. And what is the life of this world except the enjoyment of delusion.

Qur'an Surah Imran [3:185]

كُلُّ مَنْ عَلَيْهَا فَانٍ
وَيَبْقَىٰ وَجْهُ رَبِّكَ ذُو الْجَلَالِ وَالْإِكْرَامِ

Kullu man AAalayha fan
And there will remain the Face of your Lord, Owner of Majesty and Honor.

Everyone upon the earth will perish,
And there will remain the Face of your Lord, Owner of Majesty and Honor.

Qur'an Surah Rahman [55:26-27]

Usamah bin Zaid said:

“The son of one of the daughters of the Messenger of Allah (ﷺ) was dying. She sent for him, asking him to come to her, and he sent word to her, saying: ‘To Allah belongs what He has taken and to Him belongs what He has given. Everything has an appointed time with Him, so be patient and seek reward.’ But she sent for him again, adjuring him to come. So the Messenger of Allah (ﷺ) got up, and I got up with him, as did Mu’adh bin Jabal, Ubayy bin Ka’b and ‘Ubadah bin Samit. When we entered they handed the child to the Messenger of Allah (ﷺ), and his soul was rattling in his chest.” I think he was that it was like a water skin. “The Messenger of Allah (ﷺ) wept, and ‘Ubadah bin Samit said to him: ‘What is this, O Messenger of Allah?’ He said: ‘It is compassion which Allah has created in the son of Adam. Allah only shows mercy to those of His slaves who are compassionate.’”

Sunan Ibn Majah Hadith 1588
Hadith - Chapters Regarding Funerals - Sunan Ibn Majah - Sunnah.com - Sayings and Teachings of Prophet Muhammad (صلى الله عليه و سلم)
Hadith of the Prophet Muhammad (saws) in English and Arabic


On the authority of Abu Hurayrah (may Allah be pleased with him), who said that the Messenger of Allah (ﷺ) said:

Allah (mighty and sublime be He) says: My faithful servant's reward from Me, if I have taken to Me his best friend from amongst the inhabitants of the world and he has then borne it patiently for My sake, shall be nothing less than Paradise. It was related by al-Bukhari.

40 Hadith Qudsi - 29
Hadith - 40 Hadith Qudsi - Sunnah.com - Sayings and Teachings of Prophet Muhammad (صلى الله عليه و سلم)
On the authority of Abu Hurayrah (may Allah be pleased with him), who said that the Messenger of Allah (ﷺ) said: Allah (mighty and sublime be He) says: My faithful servant’s reward from Me, if I have taken to Me his best friend from amongst the inhabitants of the world and he has then borne it pat


Awf bin Malik said:

"I heard the Messenger of Allah, while he was performing Salat for a deceased person. I could hear him saying in his prayer: (Allahummagfir lahu, war hamhu, waghsilhu bil-baradi (waghsilhu) kama yughsaluth-thawb) 'O Allah! Forgive him, have mercy upon him, and wash him with (snow or ice) (and wash him) just as a garment is washed.'"

Jami` at-Tirmidhi 1025
Hadith - The Book on Jana″iz (Funerals) - Jami` at-Tirmidhi - Sunnah.com - Sayings and Teachings of Prophet Muhammad (صلى الله عليه و سلم)
Awf bin Malik said: “I heard the Messenger of Allah, while he was performing Salat for a deceased person. I could hear him saying in his prayer: (Allahummagfir lahu, war hamhu, waghsilhu bil-baradi (waghsilhu) kama yughsaluth-thawb) ’O Allah! Forgive him, have mercy upon him, and wash him with (snow