Reference : Hisn al-Muslim 157

اللهُـمِّ اغْفِـرْ لِحَيِّـنا وَمَيِّتِـنا، 
وَشـاهِدِنا وَغائِبِـنا ، 
وَصَغيـرِنا وَكَبيـرِنا ،
وَذَكَـرِنا وَأُنْثـانا .
اللهُـمِّ مَنْ أَحْيَيْـتَهُ مِنّا
فَأَحْيِـهِ عَلى الإِسْلام ،
وَمَنْ تَوَفَّـيْتَهُ مِنّا فَتَوَفَّـهُ عَلى الإِيـمان ،
اللهُـمِّ لا تَحْـرِمْنـا أَجْـرَه ،
وَلا تُضِـلَّنا بَعْـدَه
Allāhumma’ghfir liḥayyinā, wa mayyitinā, 
wa shāhidinā, wa ghā'ibinā,
wa ṣaghīrinā wa kabīrinā, 
wa dhakarinā wa unthānā. 
Allāhumma man aḥyaytahu minnā 
fa aḥyihi `ala ‘l-Islām, 
wa man tawaffaytahu minnā
fatawaffahu `alal-īmān, 
Allāhumma lā taḥrimnā ajrah
wa lā tuḍillanā ba`dah.


O Allah forgive our living and our dead, 
those who are with us and those who are absent, 
our young and our old, 
our menfolk and our womenfolk. 
O Allah, whomever you give life from among us 
give him life in Islam, 
and whomever you take away from us 
take him away in Faith. 
O Allah, do not forbid us their reward 
and do not send us astray after them.

Reference:
Ibn Majah 1/480, Ahmad 2/368. See also Al-Albani, Sahih Ibn Majah 1/251.

Chapter: For the deceased at the funeral prayer