All perfect praise be to Allaah, The Lord of the worlds. I testify that there is none worthy of worship except Allaah and that Muhammad is His slave and Messenger.
Tattooing animals for the purpose of distinguishing them from each other is permissible if it is not done on their faces, as the scholars permitted branding the animal at a place other than the face for a need.
An-Nawawi said, “It is desirable to brand sheep in their ears and camels and cows at the top of their thighs because it is a solid place, so the pain is less, and the hair is lighter, so the brand is clear. The benefit of branding is to make a distinction between one animal and another.”
The author of Kash-shaaf Al-Qinaa’ said, “It is permissible to brand the animal in other than the face for a valid purpose.”
As regards the meaning of branding (or tattooing), it was stated by Badr ad-Deen al-'Ayni in Sharh Saheeh Al-Bukhari: “It is to mark something with something that has a great effect on it.”
This branding has no effect on the validity of offering the animal as a sacrifice because this is not a defect in it and does not reduce its value.
As regards putting numbers or marks on the animal with colors or painting them (the numbers or marks) by removing the hair and the like in order to distinguish between one animal and another, then this is easier (less painful) than branding or tattooing with fire as it does not cause any torture to the animal.
Allaah knows best.