Short answer
Yes, both are halal animals when properly slaughtered. The zebra is a wild equid, and the Prophet ﷺ allowed the meat of the wild donkey while forbidding the domestic donkey. The giraffe is a grazing animal without fangs or talons. The meat still needs zabiha like any other.
Wild donkeys are halal and domestic donkeys are haram; scholars treat the zebra as a wild donkey. Giraffes are halal, as plant-eaters without fangs. Both require Islamic slaughter or lawful hunting.
The four schools agree on this.
Explanation
At Khaybar the Prophet ﷺ had it announced that Allah and His Messenger forbade the meat of domestic donkeys. Yet when Abu Qatada hunted a wild donkey, the Prophet allowed its meat and called it food that Allah had given them. So the Sunnah separates the domestic donkey from the wild one.
Zebra: zebras are wild equids, close relatives of the wild donkey (himar wahshi) of the hadith, and scholars generally give them the same ruling: halal. Giraffe: the giraffe eats leaves, has no fangs and does not hunt, so it falls under the general rule that such animals are halal. Shafi'i scholars mention it by name, and the Hanafi principles lead to the same result.
In practice these meats are rare. Some game farms and restaurants, especially in southern Africa, serve zebra and other game. The animal must be slaughtered by zabiha or hunted with a sharp weapon and bismillah, as with deer. Meat from a hunt by gunfire is not halal in the Hanafi school unless the animal was reached alive and slaughtered.
Horses are a separate case (see horse meat), and the full list of forbidden animals is in what animals are haram.
The evidence
Quran, Surah Al-Maaida 5:1
بِسْمِ ٱللَّهِ ٱلرَّحْمَٰنِ ٱلرَّحِيمِ يَٰٓأَيُّهَا ٱلَّذِينَ ءَامَنُوٓا۟ أَوْفُوا۟ بِٱلْعُقُودِ ۚ أُحِلَّتْ لَكُم بَهِيمَةُ ٱلْأَنْعَٰمِ إِلَّا مَا يُتْلَىٰ عَلَيْكُمْ غَيْرَ مُحِلِّى ٱلصَّيْدِ وَأَنتُمْ حُرُمٌ ۗ إِنَّ ٱللَّهَ يَحْكُمُ مَا يُرِيدُ ﴿١﴾
O you who have believed, fulfill [all] contracts. Lawful for you are the animals of grazing livestock except for that which is recited to you [in this Qur'an] - hunting not being permitted while you are in the state of ihram. Indeed, Allah ordains what He intends.
Grazing animals are lawful.
Sahih al-Bukhari 4199
Sahih... إن الله ورسوله ينهيانكم عن لحوم الحمر الأهلية ...
"Allah and His Messenger forbid you the meat of domestic donkeys."
Only the domestic donkey is forbidden.
Sahih al-Bukhari 2914
Sahih... إنما هي طعمة أطعمكموها الله ...
"It is food that Allah has given you to eat."
Said of the wild donkey, showing its meat is lawful.
Where the ruling is recorded
- al-Hidaya, Kitab al-Dhaba'ih. The domestic donkey and mule are not eaten; the wild donkey is lawful.
- al-Majmu' (Nawawi), Kitab al-At'ima. The giraffe is named among lawful animals.
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.