Short answer
Not in front of small boys who do not yet understand anything about women's bodies. Once a boy is near puberty and aware of such things, often from around 10 to 12 but it depends on the child, the Hanafi school treats him like an adult man, and hijab is needed in front of him unless he is your mahram.
A boy who does not yet understand matters of attraction is not counted, and a woman need not cover before him. A murahiq (a boy near puberty who is aware of such matters) is treated like an adult man for hijab and seclusion. Boys who are mahram, such as sons, brothers and nephews, never require hijab.
The four schools agree on this.
Explanation
After listing the people a woman may show her adornment to, the Quran adds "children who are not yet aware of the private aspects of women". It also tells families to teach children who have not reached puberty to ask permission at three private times of day, and once they reach puberty, at all times. So the Quran itself ties these rules to a child's awareness, not to a fixed age.
How the Hanafi scholars apply it:
- Small children who do not notice or describe anything: no hijab needed.
- A boy who is aware, who notices looks, comments on women's appearance or shows interest: treated as near puberty (murahiq). Cover in front of him as in front of a man.
- After puberty: he is an adult man.
- Mahram boys: your sons, brothers, nephews, grandsons and milk relatives never need hijab, at any age. See who is a mahram.
Ages vary. Some boys are aware at nine, others not until twelve. Many scholars treat about ten as the point to start being careful, but the mother or aunt should judge the child in front of her rather than go by a number. Cousins, neighbours' sons and friends' children are the usual cases.
The same awareness rule lies behind teaching children to ask before entering a parent's room, and the Prophet's ﷺ instruction to separate children's beds by the age of ten. See at what age is a child accountable and awrah for men and women.
The evidence
Quran, Surah An-Noor 24:31
وَقُل لِّلْمُؤْمِنَٰتِ يَغْضُضْنَ مِنْ أَبْصَٰرِهِنَّ وَيَحْفَظْنَ فُرُوجَهُنَّ وَلَا يُبْدِينَ زِينَتَهُنَّ إِلَّا مَا ظَهَرَ مِنْهَا ۖ وَلْيَضْرِبْنَ بِخُمُرِهِنَّ عَلَىٰ جُيُوبِهِنَّ ۖ وَلَا يُبْدِينَ زِينَتَهُنَّ إِلَّا لِبُعُولَتِهِنَّ أَوْ ءَابَآئِهِنَّ أَوْ ءَابَآءِ بُعُولَتِهِنَّ أَوْ أَبْنَآئِهِنَّ أَوْ أَبْنَآءِ بُعُولَتِهِنَّ أَوْ إِخْوَٰنِهِنَّ أَوْ بَنِىٓ إِخْوَٰنِهِنَّ أَوْ بَنِىٓ أَخَوَٰتِهِنَّ أَوْ نِسَآئِهِنَّ أَوْ مَا مَلَكَتْ أَيْمَٰنُهُنَّ أَوِ ٱلتَّٰبِعِينَ غَيْرِ أُو۟لِى ٱلْإِرْبَةِ مِنَ ٱلرِّجَالِ أَوِ ٱلطِّفْلِ ٱلَّذِينَ لَمْ يَظْهَرُوا۟ عَلَىٰ عَوْرَٰتِ ٱلنِّسَآءِ ۖ وَلَا يَضْرِبْنَ بِأَرْجُلِهِنَّ لِيُعْلَمَ مَا يُخْفِينَ مِن زِينَتِهِنَّ ۚ وَتُوبُوٓا۟ إِلَى ٱللَّهِ جَمِيعًا أَيُّهَ ٱلْمُؤْمِنُونَ لَعَلَّكُمْ تُفْلِحُونَ ﴿٣١﴾
And tell the believing women to reduce [some] of their vision and guard their private parts and not expose their adornment except that which [necessarily] appears thereof and to wrap [a portion of] their headcovers over their chests and not expose their adornment except to their husbands, their fathers, their husbands' fathers, their sons, their husbands' sons, their brothers, their brothers' sons, their sisters' sons, their women, that which their right hands possess, or those male attendants having no physical desire, or children who are not yet aware of the private aspects of women. And let them not stamp their feet to make known what they conceal of their adornment. And turn to Allah in repentance, all of you, O believers, that you might succeed.
Small children who are unaware are excepted from hijab.
Quran, Surah An-Noor 24:58
يَٰٓأَيُّهَا ٱلَّذِينَ ءَامَنُوا۟ لِيَسْتَـْٔذِنكُمُ ٱلَّذِينَ مَلَكَتْ أَيْمَٰنُكُمْ وَٱلَّذِينَ لَمْ يَبْلُغُوا۟ ٱلْحُلُمَ مِنكُمْ ثَلَٰثَ مَرَّٰتٍۢ ۚ مِّن قَبْلِ صَلَوٰةِ ٱلْفَجْرِ وَحِينَ تَضَعُونَ ثِيَابَكُم مِّنَ ٱلظَّهِيرَةِ وَمِنۢ بَعْدِ صَلَوٰةِ ٱلْعِشَآءِ ۚ ثَلَٰثُ عَوْرَٰتٍۢ لَّكُمْ ۚ لَيْسَ عَلَيْكُمْ وَلَا عَلَيْهِمْ جُنَاحٌۢ بَعْدَهُنَّ ۚ طَوَّٰفُونَ عَلَيْكُم بَعْضُكُمْ عَلَىٰ بَعْضٍۢ ۚ كَذَٰلِكَ يُبَيِّنُ ٱللَّهُ لَكُمُ ٱلْءَايَٰتِ ۗ وَٱللَّهُ عَلِيمٌ حَكِيمٌۭ ﴿٥٨﴾
O you who have believed, let those whom your right hands possess and those who have not [yet] reached puberty among you ask permission of you [before entering] at three times: before the dawn prayer and when you put aside your clothing [for rest] at noon and after the night prayer. [These are] three times of privacy for you. There is no blame upon you nor upon them beyond these [periods], for they continually circulate among you - some of you, among others. Thus does Allah make clear to you the verses; and Allah is Knowing and Wise.
Children's rules change with their awareness and puberty.
Sunan Abi Dawud 495
Graded hasan sahih... وفرقوا بينهم في المضاجع ...
"And separate them in their beds."
Awareness from around ten brings new boundaries.
Where the ruling is recorded
- Radd al-Muhtar (Ibn Abidin), Kitab al-Hazr wa al-Ibahah, chapter on looking and touching. A small boy who has no desire is not counted; one near puberty is like an adult man.
- al-Hidaya, Kitab al-Karahiyya, chapter on looking and touching. The rules of looking apply to the adult man and those treated like him.
Checked by our team. For a more accurate answer to your own situation, consult a scholar. Quran translation by Sahih International. Hadith Arabic from the standard editions of the six books and the Muwatta, with gradings as recorded there; the English is our own rendering. Spotted a mistake? Tell us.