Praise be to Allah.
It is permissible to keep pretty birds and the like in cages, especially if that is to enjoy looking at them or listening to their voices, subject to the condition that you give them food and drink.
It is proven in al-Saheehayn (al-Bukhaari, 5778; Muslim, 2150) that the brother of Anas ibn Maalik through his mother was called Abu ‘Umayr and he had a bird whose name was al-nughayr. The bird died and the child grieved for it, and the Prophet (peace and blessings of Allaah be upon him) tried to cheer him up by saying, “O Abu ‘Umayr, what happened to al-nughayr?”
The nughayr is a small bird like a sparrow, or it was said that it is a nightingale.
This hadeeth is taken as evidence that it is permissible to keep birds, because the Prophet (peace and blessings of Allaah be upon him) did not denounce Abu ‘Umayr for doing so.
See Fath al-Baari, 10/548
Shaykh ‘Abd al-‘Azeez ibn Baaz (may Allaah have mercy on him) was asked:
What is the ruling on one who collects birds and keeps them in a cage in order for his children to enjoy looking at them?
There is nothing wrong with that, so long as he gives them what they need of food and drink, because the basic principle concerning this matter is that is it permitted, and there is no evidence to the contrary as far as we know. And Allaah is the Source of strength.
Fataawa ‘Ulama’ al-Balad al-Haraam, p. 1793.
The scholars of the Standing Committee said:
Selling pretty birds – such as parrots, other colourful birds and nightingales – for the sake of their voices is permissible, because looking at them and listening to their voices is something that is permissible. There is no text in Islam to say that it is haraam to sell them or keep them. Rather there are texts which may be taken to mean that it is permissible to keep them so long as one gives them food and drink and does whatever they need. For example, al-Bukhaari narrated that Anas said: The Prophet (peace and blessings of Allaah be upon him) was the best of people in attitude, and I had a brother called Abu ‘Umayr. I think he was already weaned, and when he (the Prophet (peace and blessings of Allaah be upon him)) came he would say, “O Abu ‘Umayr, what happened to al-nughayr?” – a nightingale with which he used to play… The nightingale is a kind of bird. Al-Haafiz ibn Hajar said in his commentary Fath al-Baari, among his list of the things that we learn from this hadeeth: … It is permissible for young children to play with birds, and it is permissible for parents to allow their children to play with things with which it is permissible to play, and it is permissible to spend money on permissible things which will amuse young children, and it is permissible to keep birds in cages and the like, and to clip the birds of wings – because one of the two must have applied in the case of Abu ‘Umayr’s bird, and whichever was the case, the ruling also applies to the other. Similarly it was narrated from Abu Hurayrah (may Allaah be pleased with him) that the Prophet (peace and blessings of Allaah be upon him) said: “A woman entered the Fire because of a cat which she kept and did not give it food or water, nor did she set it free to eat of the vermin of the earth.” Narrated by al-Bukhaari in al-Saheeh. If this is permissible in the case of cats, then it is also permissible in the case of birds and the like.
Some of the scholars are of the view that it is makrooh to keep them, and some disallowed that and said: Because man has no need to listen to their voices or enjoy looking at them. Rather this is a kind of extravagance and luxury, and it is also foolishness because he is enjoying the voice of a bird who is longing to fly free, as it says in al-Furoo’ wa Tasheehuhu, 4/9; and al-Insaaf, 4/275.
Shaykh ‘Abd al-‘Azeez ibn Baaz, Shaykh ‘Abd al-‘Azeez Aal al-Shaykh, Shaykh Saalih al-Fawzaan, Shaykh Bakr Abu Zayd.
Fataawa al-Lajnah al-Daa’imah, 13/38-40
And Allaah knows best.