I heard the Prophet ﷺ say (while offering prayer on a dead body): O Allah! forgive him, have mercy upon him. Give him peace and absolve him. Receive him with honour and make his grave spacious. Wash him with water, snow and hail, cleanse him from faults as is cleaned a white garment from impurity. Requite him with an abode more excellent than his abode, with a family better than his family, and with a mate better than his mate, and save him from the trial of the grave and torment of Hell. 'Auf b. Malik said: I earnestly desired that I were the dead person to receive the prayer of the Messenger of Allah ﷺ as this dead body had (received). (Using translation from Muslim 963d)
صَلَّيْتُ مَعَ رَسُولِ اللهِ ﷺ عَلَى جِنَازَةٍ فَفَهِمْتُ مِنْ صَلَاتِهِ عَلَيْهَا قَالَ اللهُمَّ اغْفِرْ لَهُ وَارْحَمْهُ وَاعْفُ عَنْهُ وَعَافِهِ وَأَكْرِمْ نُزُلَهُ وَوَسِّعْ عَلَيْهِ مُدْخَلَهُ وَاغْسِلْهُ بِمَاءِ بَرَدٍ أَوْ ثَلْجٍ وَنَقِّهِ مِنَ الْخَطَايَا كَمَا يُنَقَّى الثَّوْبُ الْأَبْيَضُ مِنَ الدَّنَسِ اللهُمَّ أَبْدِلْهُ دَارًا خَيْرًا مِنْ دَارِهِ وَزَوْجًا خَيْرًا مِنْ زَوْجِهِ وَأَهْلًا خَيْرًا مِنْ أَهْلِهِ وَقِهِ فِتْنَةَ الْقَبْرِ وَعَذَابَ النَّارِ قَالَ عَوْفٌ فَتَمَنَّيْتُ أَنْ أَكُونَ أَنَا الْمَيِّتَ