Abu Huraira reported from Allah's Messenger (may peace be upom him) many ahadith and one amongst them is that he is reported to have said:

An infant is born according to his (true) nature. It is his parents Who make him a Jew, a Christian, just as a she-camel gives birth to its young ones. Do you find any deficiency in their limbs? You cut their ears (i. e. after birth). They (the Companions of the Holy Prophet) said: What is your opinion about him who dies in infancy? Thereupon Allah's Apostle (ﷺ) said: It is Allah alone Who knows best what they would be doing.
حَدَّثَنَا مُحَمَّدُ بْنُ رَافِعٍ، حَدَّثَنَا عَبْدُ الرَّزَّاقِ، حَدَّثَنَا مَعْمَرٌ، عَنْ هَمَّامِ بْنِ مُنَبِّهٍ، قَالَ هَذَا مَا حَدَّثَنَا أَبُو هُرَيْرَةَ، عَنْ رَسُولِ اللَّهِ صلى الله عليه وسلم ‏.‏ فَذَكَرَ أَحَادِيثَ مِنْهَا وَقَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏"‏ مَنْ يُولَدُ يُولَدُ عَلَى هَذِهِ الْفِطْرَةِ فَأَبَوَاهُ يُهَوِّدَانِهِ وَيُنَصِّرَانِهِ كَمَا تَنْتِجُونَ الإِبِلَ فَهَلْ تَجِدُونَ فِيهَا جَدْعَاءَ حَتَّى تَكُونُوا أَنْتُمْ تَجْدَعُونَهَا ‏"‏ ‏.‏ قَالُوا يَا رَسُولَ اللَّهِ أَفَرَأَيْتَ مَنْ يَمُوتُ صَغِيرًا قَالَ ‏"‏ اللَّهُ أَعْلَمُ بِمَا كَانُوا عَامِلِينَ ‏"‏ ‏.‏
Reference : Sahih Muslim 2658 g
In-book reference : Book 46, Hadith 39
USC-MSA web (English) reference : Book 33, Hadith 6428
  (deprecated numbering scheme)