"اللَّهُمَّ اغْفِر لأولنا وآخِرنَا، وَحيِّنَا وميِّتِنَا، وذَكَرنَا وأُنثانَا، وصَغيرنَا وكَبيرنَا، وَشَاهدنَا وَغَائِبنا، اللَّهُمَّ لَا تَحْرمْنَا أَجْرَهُ، وَلَا تُضلَّنَا بَعْدَهُ" .
See similar narrations below:
Collected by Nasāʾī, Abū Dāwūd, Ibn Mājah, Aḥmad, Nasāʾī's Kubrá, Suyūṭīhe heard the Prophet say, when offering the funeral prayer for one who had died: Allahummighfir lihayyina wa mayyitina wa shahidina wa gha'ibina wadhakarina wa unthana wa saghirina wa kabirina (O Allah, forgive our living and our dead, those who are present among us and those who are absent, our males and our females, our young and our old).
أَنَّهُ سَمِعَ النَّبِيَّ ﷺ يَقُولُ فِي الصَّلاَةِ عَلَى الْمَيِّتِ اللَّهُمَّ اغْفِرْ لِحَيِّنَا وَمَيِّتِنَا وَشَاهِدِنَا وَغَائِبِنَا وَذَكَرِنَا وَأُنْثَانَا وَصَغِيرِنَا وَكَبِيرِنَا
When the Messenger of Allah ﷺ prayed over a dead person, he said: O Allah, forgive those of us who are living and those of us who are dead, those of us who are present and those of us who are absent, our young and our old, our male and our female. O Allah, to whomsoever of us Thou givest life grant him life as a believer, and whomsoever of us Thou takest in death take him in death as a follower of Islam. O Allah, do not withhold from us the reward (of faith) and do not lead us astray after his death.
صَلَّى رَسُولُ اللَّهِ ﷺ عَلَى جَنَازَةٍ فَقَالَ اللَّهُمَّ اغْفِرْ لِحَيِّنَا وَمَيِّتِنَا وَصَغِيرِنَا وَكَبِيرِنَا وَذَكَرِنَا وَأُنْثَانَا وَشَاهِدِنَا وَغَائِبِنَا اللَّهُمَّ مَنْ أَحْيَيْتَهُ مِنَّا فَأَحْيِهِ عَلَى الإِيمَانِ وَمَنْ تَوَفَّيْتَهُ مِنَّا فَتَوَفَّهُ عَلَى الإِسْلاَمِ اللَّهُمَّ لاَ تَحْرِمْنَا أَجْرَهُ وَلاَ تُضِلَّنَا بَعْدَهُ
“When the Messenger of Allah ﷺ offered the funeral prayer he would say: ‘Allahummaghfir lihayyina wa mayyitina, wa shahidina wa gha’ibina, wa saghirina wa kabirina, wa dhakarina wa unthana. Allahumma man ahyaitahu minna fa'ahyihi ‘alal-Islam, wa man tawaffaytahu minna fa tawaffahu ‘alal- iman. Allahumma la tahrimna ajrahu wa la tudillana ba’dah. [O Allah, forgive our living and our dead, those who are present and those who are absent, our young and our old, our males and our females. O Allah, whomever of us You cause to live, let him live in Islam, and whomever of us You cause to die, let him die in (a state of) faith. O Allah, do not deprive us of his reward, and do not let us go astray after him].’”
كَانَ رَسُولُ اللَّهِ ﷺ إِذَا صَلَّى عَلَى جِنَازَةٍ يَقُولُ اللَّهُمَّ اغْفِرْ لِحَيِّنَا وَمَيِّتِنَا وَشَاهِدِنَا وَغَائِبِنَا وَصَغِيرِنَا وَكَبِيرِنَا وَذَكَرِنَا وَأُنْثَانَا اللَّهُمَّ مَنْ أَحْيَيْتَهُ مِنَّا فَأَحْيِهِ عَلَى الإِسْلاَمِ وَمَنْ تَوَفَّيْتَهُ مِنَّا فَتَوَفَّهُ عَلَى الإِيمَانِ اللَّهُمَّ لاَ تَحْرِمْنَا أَجْرَهُ وَلاَ تُضِلَّنَا بَعْدَهُ
[Machine] "Indeed, the Prophet of Allah, ﷺ , used to say when praying for the deceased: 'O Allah, forgive our living and our dead, our elders and our youth, our males and our females, our present and our absent.'"
أَنَّ نَبِيَّ اللهِ ﷺ كَانَ إِذَا صَلَّى عَلَى الْجِنَازَةِ قَالَ اللهُمَّ اغْفِرْ لِحَيِّنَا وَمَيِّتِنَا وَكَبِيرِنَا وَصَغِيرِنَا وَذَكَرِنَا وَأُنْثَانَا وَشَاهِدِنَا وَغَائِبِنَا
he heard the Prophet say, when offering the funeral prayer for one who had died: Allahummighfir lihayyina wa mayyitina wa shahidina wa gha'ibina wadhakarina wa unthana wa saghirina wa kabirina (O Allah, forgive our living and our dead, those who are present among us and those who are absent, our males and our females, our young and our old). (Using translation from Nasāʾī 1986)
سَمِعَ النَّبِيَّ ﷺ يَقُولُ فِي الصَّلَاةِ عَلَى الْمَيِّتِ «اللهُمَّ اغْفِرْ لِحَيِّنَا وَمَيِّتِنَا وَشَاهِدِنَا وَغَائِبِنَا وَذَكَرِنَا وَأُنْثَانَا وَصَغِيرِنَا وَكَبِيرِنَا»
When the Messenger of Allah ﷺ prayed over a dead person, he said: O Allah, forgive those of us who are living and those of us who are dead, those of us who are present and those of us who are absent, our young and our old, our male and our female. O Allah, to whomsoever of us Thou givest life grant him life as a believer, and whomsoever of us Thou takest in death take him in death as a follower of Islam. O Allah, do not withhold from us the reward (of faith) and do not lead us astray after his death. (Using translation from Abū Dāʾūd 3201)
عَنِ النَّبِيِّ ﷺ أَنَّهُ كَانَ يَقُولُ فِي الصَّلَاةِ «اللهُمَّ اغْفِرْ لِحَيِّنَا وَمَيِّتِنَا وَذَكَرِنَا وَأُنْثَانَا وَصَغِيرِنَا وَكَبِيرِنَا وَغَائِبِنَا وَشَاهِدِنَا اللهُمَّ مَنْ أَحْيَيْتَهُ مِنَّا فَأَحْيِهِ عَلَى الْإِسْلَامِ وَمَنْ تَوَفَّيْتَهُ مِنَّا فَتَوَفَّهُ عَلَى الْإِسْلَامِ اللهُمَّ لَا تَحْرِمْنَا أَجْرَهُ وَلَا تَفْتِنَّا بَعْدَهُ»
"اللَّهُمَّ اغْفِرْ لِحَيِّنَا وَميِّتِنَا ، وَشَاهِدِنَا وَغَائِبِنَا، وَصَغِيرِنَا وَكَبِيرِنَا وَذَكَرنَا وَأُنْثَانَا، اللَّهُمَّ مَنْ أَحْيَيتَهُ مِنَّا فَأَحْيِه عَلَى الإِسْلامِ، وَمَنْ تَوَفَّيتَهُ مِنَّا فَتَوَفِّهُ علَى الإِيِمانِ، اللَّهُمَّ لَا تَحْرِمْنَا أجْرَهُ، وَلَا تُضِلَّنَا بَعْدَهُ".