كتاب القدر
46
The Book of Destiny
(6)
Chapter: The Meaning Of "Every Child Is Born In A State Of Fitrah" And The Ruling On The Dead Children Of The Disbelievers And Of The Muslims.
(6)
بَاب مَعْنَى كُلِّ مَوْلُودٍ يُولَدُ عَلَى الْفِطْرَةِ وَحُكْمِ مَوْتِ أَطْفَالِ الْكُفَّارِ وَأَطْفَالِ الْمُسْلِمِينَ

Abu Huraira reported Allah's Messenger (ﷺ) as saying:

No babe is born but upon Fitra. It is his parents who make him a Jew or a Christian or a Polytheist. A person said: Allah's Messenger, what is your opinion if they were to die before that (before reaching the age of adolescence when they can distinguish between right and wrong)? He said: It is Allah alone Who knows what they would be doing.
حَدَّثَنَا زُهَيْرُ بْنُ حَرْبٍ، حَدَّثَنَا جَرِيرٌ، عَنِ الأَعْمَشِ، عَنْ أَبِي صَالِحٍ، عَنْ أَبِي هُرَيْرَةَ، قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏"‏ مَا مِنْ مَوْلُودٍ إِلاَّ يُلِدَ عَلَى الْفِطْرَةِ فَأَبَوَاهُ يُهَوِّدَانِهِ وَيُنَصِّرَانِهِ وَيُشَرِّكَانِهِ ‏"‏ ‏.‏ فَقَالَ رَجُلٌ يَا رَسُولَ اللَّهِ أَرَأَيْتَ لَوْ مَاتَ قَبْلَ ذَلِكَ قَالَ ‏"‏ اللَّهُ أَعْلَمُ بِمَا كَانُوا عَامِلِينَ ‏"‏ ‏.‏
Reference : Sahih Muslim 2658 e
In-book reference : Book 46, Hadith 37
USC-MSA web (English) reference : Book 33, Hadith 6426
  (deprecated numbering scheme)