Death is inevitable, hence we should know what duas to make during a funeral or while visiting a grave
Those around the sick should instruct and encourage him to say the shahadah. ‘He whose last words are: ‘None has the right to be worshipped except Allah. ...will enter Paradise.’
‘O Allah, forgive (mention the name of the deceased here) and raise his rank among the rightly guided, and be a successor to whom he has left behind, and forgive us and him O Lord of the worlds. Make spacious his grave and illuminate it for him.’
‘O Allah, forgive and have mercy upon him, excuse him and pardon him, and make honourable his reception. Expand his entry, and cleanse him with water, snow, and ice, and purify him of sin as a white robe is purified of filth. Exchange his home for a better home, and his family for a better family, and his spouse for a better spouse. Admit him into the Garden, protect him from the punishment of the grave and the torment of the Fire.’
‘O Allah, forgive our living and our dead, those present and those absent, our young and our old, our males and our females. O Allah, whom amongst us You keep alive, then let such a life be upon Islam, and whom amongst us You take unto Yourself, then let such a death be upon faith. O Allah, do not deprive us of his reward and do not let us stray after him.’
‘O Allah, so-and-so is under Your care and protection so protect him from the trial of the grave and torment of the Fire. Indeed You are faithful and truthful. Forgive and have mercy upon him, surely You are The Oft-Forgiving, The Most-Merciful.’
‘O Allah, Your servant and the son of Your maidservant is in need of Your mercy and You are without need of his punishment. If he was righteous then increase his reward and if he was wicked then look over his sins.’
This supplication is made when the deceased is a baby/child (i.e. one not having reached the age of puberty). After seeking forgiveness for the deceased, one can say: ‘O Allah, make him a preceding reward and a stored treasure for his parents, and an answered intercessor. O Allah, through him, make heavy their scales and magnify their reward. Unite him with the righteous believers, place him under the care of Ibraheem, and protect him by Your mercy from the torment of Hell.’
Al-Hasan used to recite the opening chapter of the Quran (i.e. Al-Fatihah) over the child and then supplicate: ‘O Allah, make him a preceding reward, a prepayment and a recompense for us.’
‘Verily to Allah, belongs what He took and to Him belongs what He gave, and everything with Him has an appointed time…and then he r ordered for her to be patient and hope for Allah’s reward.’ The words (faltasbir waltahtasib) are commands in the feminine 3rd person form, so they will need to be changed in respect to whom is being addressed. ...and one can also say: ‘May Allah magnify your reward, make better your solace and forgive your deceased.’ Note: This is the saying of some of the scholars, not a hadeeth.
‘In the name of Allah and upon the sunnah of the Messenger of Allah.’
‘After the Prophet (saw) would bury the deceased he would stand by the grave and say: ‘Seek forgiveness for your brother and pray that he remains firm, for he is now being questioned’.’
‘Peace be upon you all, O inhabitants of the graves, amongst the believers and the Muslims. Verily we will, Allah willing, be united with you, we ask Allah for well-being for us and you.’