Is using AI or ChatGPT haram?
Question 1169
Question
Is it permissible to use artificial intelligence such as ChatGPT for study, work, writing, or making images, and can AI be trusted on religious questions?
Summary of answer
Using AI is halal. The first revelation praised the Lord who taught by the pen (96:4), and Muslim scholars from al-Khwarizmi, whose name gave the world the word algorithm, to the engineers of medieval Baghdad built tools of knowledge. The limits are moral: no cheating, deception, or fake images of real people, and every claim checked, since AI can invent verses and hadith. AI images fall under the ruling on drawing, which is halal.
Answer
الحمد لله Praise be to Allah.

Students use AI to study, programmers to write code, doctors to read scans, and ordinary people to draft emails, translate, and plan their week. Many Muslims wonder whether all this is allowed. The answer of the tradition is calm and clear: using AI is halal. It is a tool, and in Islamic law a tool takes the ruling of what it is used for (al-wasāʾil lahā aḥkām al-maqāṣid). Used to learn, serve, and create, it is good. Used to cheat, deceive, or harm, it is haram.
What does Islam say about knowledge and new tools?
The first verses revealed to the Prophet ﷺ praise Allah as a teacher, and they name the technology of their day:
ٱقۡرَأۡ وَرَبُّكَ ٱلۡأَكۡرَمُ ٱلَّذِي عَلَّمَ بِٱلۡقَلَمِ عَلَّمَ ٱلۡإِنسَٰنَ مَا لَمۡ يَعۡلَمۡ
“Read, for your Lord is the Most Generous, who taught by the pen, taught humankind what it did not know.”
The Quran tells how Allah taught Adam the names of all things (2:31), and it gives the Prophet ﷺ a prayer: “My Lord, increase me in knowledge” (20:114). The Prophet ﷺ said that whoever walks a path seeking knowledge, Allah makes easy for him a path to Paradise (Sahih Muslim 2699a).
Muslim civilization built tools for thinking. The mathematician al-Khwarizmi worked in ninth-century Baghdad, and the Latin form of his name gave the world the word “algorithm,” while the title of his book on al-jabr gave it “algebra.” In the same city the three brothers known as the Banū Mūsā wrote a Book of Ingenious Devices full of self-operating machines, and in 1206 al-Jazarī described water clocks and automata of astonishing design. Modern AI stands in that line (Does Islam encourage science?). The jurists’ rule for new things is that whatever no text forbids is permitted (al-aṣl fī al-ashyāʾ al-ibāḥa).
When does using AI become haram?
AI becomes haram when it is used for what is haram.
- Cheating. Handing in AI-written work as your own where it is not allowed, faking data, or misleading an employer is deception. “Whoever deceives is not of me” (Sahih Muslim 102), and lying is discussed in Is lying haram?
- Fake images and voices of real people. A deepfake that puts words in someone’s mouth or shows them in a shameful scene is slander (buhtān) and a violation of their honor.
- Spreading what you have not checked. The Quran commands:
يَـٰٓأَيُّهَا ٱلَّذِينَ ءَامَنُوٓاْ إِن جَآءَكُمۡ فَاسِقُۢ بِنَبَإٖ فَتَبَيَّنُوٓاْ أَن تُصِيبُواْ قَوۡمَۢا بِجَهَٰلَةٖ
“Believers, if someone untrustworthy brings you news, verify it, lest you harm people out of ignorance.”
The Prophet ﷺ added a warning that fits every forwarded message and every confident chatbot:
«كَفَى بِالْمَرْءِ إِثْمًا أَنْ يُحَدِّثَ بِكُلِّ مَا سَمِعَ»
“It is sin enough for a person to pass on everything he hears.”
Sunan Abi Dawud 4992, graded sahih by al-Albani
Can I ask ChatGPT about Islam?
AI can help you find where a subject is discussed, summarize an argument, or explain an Arabic word. It also makes mistakes with complete confidence. It can produce a verse that is not in the Quran, attribute to the Prophet ﷺ a saying he never said, and invent a fatwa. The Prophet ﷺ warned that whoever lies about him deliberately should take his seat in the Fire (Sahih al-Bukhari 110), so a Muslim never repeats a hadith without checking it. Look up every verse on quran.com and every hadith on sunnah.com, and learn how the scholars graded reports (Are all hadith authentic?). A ruling about your own marriage, money, or worship deserves a scholar who knows your situation. The Quran’s rule applies: “Do not follow what you have no knowledge of” (17:36).
Are AI-generated images haram?
AI images fall under the same ruling as drawing and painting. The stronger view, explained in Is it haram to draw faces?, is that drawing people and animals is halal, and that the hadith on the image-makers who will be most severely punished (Sahih al-Bukhari 5950) concerns idols and those who set out to rival Allah’s creation. An AI portrait, an illustrated story, or a family picture is lawful, and so is keeping such images at home (Is it haram to have pictures in your house?). The limits are the same as for any image: no indecency, no mockery, and no false pictures of real people.
How should a Muslim use AI well?
- Use it to learn, never to stop learning. Let it explain, then think for yourself.
- Be open about it where your school or employer asks.
- Check everything that matters, above all claims about religion, health, and law.
- Guard privacy, your own and others’.
- Remember the worker. Justice for people whose jobs change with new technology is part of the sharia’s care for labor (What does Islam say about workers’ rights?).
A prayer for knowledge
Every tool that helps us know more is a gift from the One who “taught humankind what it did not know.” The prayer Allah taught His Prophet ﷺ remains the best companion to any search:
وَقُل رَّبِّ زِدۡنِي عِلۡمٗا
“And say: My Lord, increase me in knowledge.”
May Allah grant us knowledge that benefits, tools that serve the good, and the wisdom to use both with truthfulness and care.
And Allah knows best. والله أعلم
Frequently asked questions
Is it haram to use AI for homework?
Using AI to understand a topic, practice, or check your work is a way of seeking knowledge. Submitting AI-written work as your own where your teacher forbids it is deception, and the Prophet ﷺ said, 'Whoever deceives is not of me' (Sahih Muslim 102).
Is AI art haram?
No. AI images fall under the same ruling as drawing and painting, which are halal; the hadiths on image-makers concern idols and rivaling Allah's creation. Avoid fake images of real people, indecent images, and images that mock.
Can I ask ChatGPT for a fatwa?
AI can help you find where a topic is discussed, but it can invent verses, hadith, and rulings that sound real. Check every verse on quran.com and every hadith on sunnah.com, and bring questions about your own life to a knowledgeable scholar.
What do Shia scholars say about AI?
Jaʿfari jurisprudence holds that whatever no text forbids is permitted (aṣālat al-ibāḥa), and new technologies are judged by their uses. On that principle, using AI for lawful ends is permitted.
Related questions
Sources
- Sahih Muslim 102 and 2699a
- Sunan Abi Dawud 4992 (passing on everything one hears)
- Sahih al-Bukhari 110 and 5950
- Banū Mūsā, Kitāb al-Ḥiyal (The Book of Ingenious Devices), Baghdad, ninth century
- Ibn al-Razzāz al-Jazarī, al-Jāmiʿ bayna al-ʿIlm wa-l-ʿAmal al-Nāfiʿ fī Ṣināʿat al-Ḥiyal (1206)
Image: Bgag, The Shah-i-Zinda necropolis, Samarkand, 2023. CC0, via Wikimedia Commons.. Image credits