It is permissible for a woman to take off her hijaab in front of her mahrams.
A woman’s mahram is a person whom she is never permitted to marry because of their close blood relationship (such as her father, grandfather, great-grandfather, etc., and her son, grandson, great-grandson, etc., her paternal and maternal uncles, her brother, brother’s son and sister’s son), or because because of radaa’ah or breastfeeding (such as the brother and husband of the woman who breastfed her), or because they are related by marriage (such as the mother’s husband, the husband’s father, grandfather, etc., and the husband’s son, grandson, etc.). More details on this subject are given below:
Mahrams by ties of blood
These are the ones mentioned in Soorat al-Noor, where Allah says (interpretation of the meaning):
“… and not to reveal their adornment except to their husbands, or their fathers, or their husband’s fathers, or their sons, or their husband’s sons, or their brothers or their brother’s sons, or their sister’s sons…” [al-Noor 24:31].
The mufassireen said: the woman’s male mahrams by ties of blood, as stated clearly in this aayah or inferred by it are as follows:
1- the woman’s forefathers, no matter how far back the line of ascent goes through her father and her mother, such as her father’s forefathers and her mother’s forefathers. As for her husband’s forefathers, they are her mahrams by marriage, as we shall see below.
2- her sons, which includes her children’s children, no matter how the line of descent goes and whether they are descended from males or females, such as her sons’ sons and her daughters’ sons. As for her “husband’s sons” mentioned in the aayah, these are the husband’s sons from other wives, and these are her mahrams by marriage, not by blood, as we shall see below.
3- her brothers, whether they are her brothers through both the mother and father, or through the father only or the mother only.
4- the children of her siblings, whether they are descended through the males or females, such as the sons of her sister’s daughters.
5- paternal uncles and maternal uncles. They are mahrams by blood even though they are not mentioned in the aayah, because they are like parents and are regarded by people as having the same status as parents, and a paternal uncle may be called a father. Allah says (interpretation of the meaning):
“Or were you witnesses when death approached Ya‘qoob (Jacob)? When he said unto his sons, “What will you worship after me?” They said, “We shall worship your Ilaah (God — Allah) the Ilaah (God) of your fathers, Ibraaheem (Abraham), Ismaa’eel (Ishmael), Ishaaq (Isaac)…” [al-Baqarah 2:133]. Ismaa’eel was the paternal uncle of the sons of Ya’qoob.
(Tafseer al-Raazi, 23/206; Tafseer al-Qurtubi, 12/232, 233; Tafseer al-Aaloosi, 18/143; Fath al-Bayaan fi Maqaasid al-Qur’aan by Siddeeq Hasan Khaan, 6/352)
Mahrams by radaa’ah (breastfeeding)
A woman may have mahrams through radaa’ah. It says in Tafseer al-Aloosi:
“The relationship of mahram which permits a woman to show her adornments may be through radaa’ah as well as through blood ties, so it is permissible for a woman to show her adornments to those who are her fathers or sons through radaa’ah.” (Tafseer al-Aaloosi. 18/143) The relationship of mahram by radaa’ah is like the relationship of mahram by blood – it means that marriage is forever forbidden by virtue of that relationship of mahram. This was the view stated by Imaam al-Jassaas when he commented on this aayah. He said (may Allah have mercy on him): “When Allah mentioned the fathers and that their marriage to these women is forbidden forever, this indicates that the same prohibition applies in other relationships of mahram, such as the mother of the woman and those who are mahrams by radaa’ah, etc.” (Ahkaam al-Qur’aan by al-Jassaas, 3/317).
The same things are made haraam by radaa’ah as by ties of blood.
It also says in the Sunnah: “The same things are made haraam by radaa’ah as by ties of blood.” This means that the people who are mahram to a woman because of blood ties are also mahram because of radaa’ah. It was reported in Saheeh Muslim that ‘Aa’ishah Umm al-Mu’mineen (may Allah be pleased with her) said that Aflah the brother of Abu Qu’ays came and asked permission to see her. He was her uncle through radaa’ah. This was after hijaab had been revealed, so she refused to give him permission. When the Messenger of Allah (peace and blessings of Allah be upon him) came, she told him about what she had done and he told her to give him permission. (Saheeh al-Bukhaari bi Sharh al-‘Asqallaani, 9/150). This hadeeth was also narrated by Imaam Muslim, where the wording is: from ‘Urwah from ‘Aa’ishah, who told him that her uncle by radaa’ah, who was called Aflah, asked permission to see her and she did not let him. She told the Messenger (peace and blessings of Allah be upon him) and he said to her, “Do not observe hijaab in front of him, because the same relationships of mahram are created by radaa’ah as by blood ties.” (Saheeh Muslim bi Sharh al-Nawawi, 10/22)
A woman’s mahrams through radaa’ah are the same as her mahrams through blood ties
In accordance with the Qur’aan and Sunnah, the fuqahaa’ have stated that a woman’s mahrams through radaa’ah are the same as her mahrams through blood ties. It is permissible for her to display her adornments before her mahrams by radaa’ah just as it is permissible for her to display her adornments before her mahrams by blood ties. It is permissible for her mahrams by radaa’ah to see whatever of her body it is permissible for her mahrams by blood ties to see.
Mahrams by marriage
A woman’s mahrams by marriage are those whom it is forever forbidden to marry, such as the father’s wife, the son’s wife or the wife’s mother. (Sharh al-Muntahaa, 3/7).
The mahram by marriage of the father’s wife is his son from another wife, for the wife of the son it is his father, and for the mother of the wife it is the husband. Allah says in Soorat al-Noor (interpretation of the meaning):
“… and not to reveal their adornment except to their husbands, or their fathers, or their husband’s fathers, or their sons, or their husband’s sons…” [al-Noor 24:31]. Their husband’s fathers and their husband’s sons are mahrams of the woman by marriage. Allah mentioned them along with their (the women’s own) fathers and sons, and made them all the same in the sense that women may display their adornments in front of them. (Al-Mughni, 6/555).
And Allah knows best.
(Source - Islam Q&A)