It is narrated from Sayyiduna Abu Hurayrah (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) said: "There is no child except that he is born upon this religion, until his tongue expresses for him; then his parents make him a Jew, or a Christian, or a polytheist, or a Magian." They said: "O Messenger of Allah (peace and blessings be upon him)! What about one who dies before that?" He (peace and blessings be upon him) said: "Allah knows best what deeds they would have done."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب اللقطة / 12141