Short answer
Yes, for a valid reason. Hanafi muftis allow temporary methods such as condoms, the pill, injections, implants and IUDs for a married couple who agree, provided a qualified doctor confirms the method is safe for you. Methods that may stop a fertilised egg from implanting call for more care, and permanent methods are only for medical necessity.
Temporary methods take the ruling of azl (withdrawal): mubah with a valid reason and mutual consent, makruh tanzihi without one. A method that harms the body is not allowed, and a device that must be fitted should be fitted by a female doctor or nurse where one is available.
The four schools agree on this.
Explanation
Barrier and hormonal methods prevent a pregnancy from starting, so they are judged like withdrawal, which the Companions practised with the Prophet's ﷺ knowledge. This covers condoms, the diaphragm, the combined pill, the mini pill, injections, implants and natural family planning (tracking the fertile days of the cycle). Classical Hanafi texts even mention a woman blocking the opening of the womb to prevent pregnancy, which is the same idea as many modern methods.
Some methods, including the copper IUD and in some cases hormonal ones, may also stop a fertilised egg from implanting. Because a pregnancy has, in a sense, begun at that point, some scholars prefer methods that act only before fertilisation. Many Deobandi muftis still allow IUDs for a genuine reason, since the Hanafi school treats the earliest stage of pregnancy far more lightly than the stage after the soul is breathed in. Emergency contraception should not become a routine method; ask a mufti if you face that situation.
Your health matters in this choice. Harming yourself is not allowed, so pick a method with a qualified doctor and stop one that causes real harm. Fitting an IUD or implant uncovers the awrah, so a female clinician is preferred; see seeing a doctor of the opposite sex. If a method causes spotting, the rules of irregular bleeding (istihadah) apply, and a scholar can help you tell which days count as your period.
The four schools agree on the principle that temporary prevention is allowed for a reason and that a method must not harm the body. Permanent methods such as vasectomy and tubal ligation are a different case, covered in is sterilisation haram. For the general ruling and the valid reasons, see is contraception haram.
Ask a mufti about your own case. This answer explains the general ruling. When the details of your situation matter, as they do here, ask a qualified mufti and give them the full facts. Where to ask a scholar.
The evidence
Quran, Surah Al-Baqara 2:195
وَأَنفِقُوا۟ فِى سَبِيلِ ٱللَّهِ وَلَا تُلْقُوا۟ بِأَيْدِيكُمْ إِلَى ٱلتَّهْلُكَةِ ۛ وَأَحْسِنُوٓا۟ ۛ إِنَّ ٱللَّهَ يُحِبُّ ٱلْمُحْسِنِينَ ﴿١٩٥﴾
And spend in the way of Allah and do not throw [yourselves] with your [own] hands into destruction [by refraining]. And do good; indeed, Allah loves the doers of good.
A method that harms your health is not allowed, so medical advice is part of the decision.
Quran, Surah Al-Baqara 2:286
لَا يُكَلِّفُ ٱللَّهُ نَفْسًا إِلَّا وُسْعَهَا ۚ لَهَا مَا كَسَبَتْ وَعَلَيْهَا مَا ٱكْتَسَبَتْ ۗ رَبَّنَا لَا تُؤَاخِذْنَآ إِن نَّسِينَآ أَوْ أَخْطَأْنَا ۚ رَبَّنَا وَلَا تَحْمِلْ عَلَيْنَآ إِصْرًۭا كَمَا حَمَلْتَهُۥ عَلَى ٱلَّذِينَ مِن قَبْلِنَا ۚ رَبَّنَا وَلَا تُحَمِّلْنَا مَا لَا طَاقَةَ لَنَا بِهِۦ ۖ وَٱعْفُ عَنَّا وَٱغْفِرْ لَنَا وَٱرْحَمْنَآ ۚ أَنتَ مَوْلَىٰنَا فَٱنصُرْنَا عَلَى ٱلْقَوْمِ ٱلْكَٰفِرِينَ ﴿٢٨٦﴾
Allah does not charge a soul except [with that within] its capacity. It will have [the consequence of] what [good] it has gained, and it will bear [the consequence of] what [evil] it has earned. "Our Lord, do not impose blame upon us if we have forgotten or erred. Our Lord, and lay not upon us a burden like that which You laid upon those before us. Our Lord, and burden us not with that which we have no ability to bear. And pardon us; and forgive us; and have mercy upon us. You are our protector, so give us victory over the disbelieving people."
The Shariah takes a woman's capacity and health into account, which is why health is a valid reason for spacing children.
Sahih Muslim 1438
Sahih... لا عليكم أن لا تفعلوا ذاكم فإنما هو القدر ...
"There is no harm on you if you do not do it, for it is only a matter of decree."
Asked about a man whose wife was nursing and who did not want her to conceive, he did not forbid withdrawal.
Where the ruling is recorded
- al-Durr al-Mukhtar, Kitab al-Nikah, Bab Nikah al-Raqiq. Allows a woman to block the opening of her womb to prevent pregnancy.
- Radd al-Muhtar (Ibn Abidin), Kitab al-Nikah, Bab Nikah al-Raqiq. Records the view that she should do so with her husband's agreement, and discusses excuses for preventing pregnancy.
This answer is pending review by the scholars on our team. 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.