The Holy Quran 18:81 — Surah Al-Kahf
Arabic text
فَأَرَدْنَآ أَن يُبْدِلَهُمَا رَبُّهُمَا خَيْرًا مِّنْهُ زَكَوٰةً وَأَقْرَبَ رُحْمًا
Translation
"(His parents would not miss him too much because) we intended that (after killing him) their Rabb (would) replace for them (as compensation) children who are better than he (the boy) in purity and affection (children who will be Mu'mineen and who would care for the physical and spiritual well-being of their parents)."
Tafsir (excerpt) — Tafsir Usmani
That is, through the boy's being killed his parents' faith was preserved, and for the grief that befell them Almighty Allah wishes to make amends with offspring better in moral purity than the slain boy: the parents will be tender towards it, and it will treat the parents with love, respect and kindness.
Preview. The full text opens with JavaScript enabled.