عن أبي عبد الرحمن بن عوف بن مالك رضي الله عنه قال‏:‏ صلى رسول الله صلى الله عليه وسلم علي جنازة، فحفظت من دعائه وهو يقول‏:‏ ‏"‏اللهم اغفر له، وارحمه، وعافه، واعف عنه، وأكرم نزله، ووسع مدخله واغسله بالماء والثلج والبرد ونقه من الخطايا، كما نقيت الثوب الأبيض من الدنس، وأبدله داراً خيراً من داره، وأهلاً خيراً من أهله، وزوجاً خيراً من زوجه، وأدخله الجنة، وأعذه من عذاب القبر، ومن عذاب النار” حتي تمنين أن أكون ذلك الميت‏.‏ ‏(‏‏(‏رواه مسلم‏)‏‏)‏‏.‏
Copy
Wathilah bin Al-Asqa' (May Allah be pleased with him) reported

The Messenger of Allah (ﷺ) led the funeral prayer of a Muslim man in our presence, and I heard him saying "Allahumma inna [name of the dead person] fi dhimmatika wa habli jiwarika, faqihi fitnatal- qabri; wa 'adhaban-Nari, wa Anta ahlul-wafa'i wal-hamdi; Allahumma faghfir lahu warhamhu, innaka Antal-Ghafur-ur-Rahim [If the dead person is a woman, one can change hu in some words here with ha] [O Allah, (so-and-so son of so-and-so) is in Your Protection and inside the surroundings of Your Refuge. Safeguard him from the trial of the grave and the punishment of the Hell. You keep Your Promise and You deserve to be praised. O Allah! Forgive him and be merciful to him. Indeed, You are the Forgiving, the Merciful]."[Abu Dawud].