Sahih al-Bukhari 1248
Book 23: Funerals (Al-Janaa'iz) · Narrated by Anas
Arabic
حَدَّثَنَا أَبُو مَعْمَرٍ، حَدَّثَنَا عَبْدُ الْوَارِثِ، حَدَّثَنَا عَبْدُ الْعَزِيزِ، عَنْ أَنَسٍ ـ رضى الله عنه ـ قَالَ قَالَ النَّبِيُّ صلى الله عليه وسلم " مَا مِنَ النَّاسِ مِنْ مُسْلِمٍ يُتَوَفَّى لَهُ ثَلاَثٌ لَمْ يَبْلُغُوا الْحِنْثَ، إِلاَّ أَدْخَلَهُ اللَّهُ الْجَنَّةَ بِفَضْلِ رَحْمَتِهِ إِيَّاهُمْ ".
English translation
Narrated Anas:The Prophet (ﷺ) said, "A Muslim whose three children die before the age of puberty will be granted Paradise by Allah due to his mercy for them
Reference: Sahih al-Bukhari 1248, Book of Funerals (Al-Janaa'iz). English translation by Dr. Muhammad Muhsin Khan.