Short answer
Burying without a coffin is the sunnah, and a coffin is makruh (disliked) without need. When there is a need, such as soft or waterlogged soil, or a cemetery or legal rule that requires one, a coffin is allowed. Hanafi scholars then advise spreading some earth inside under the body.
Burial in a coffin is makruh without need. With a need, such as wet or loose soil, or a legal requirement, it is permitted, and it is recommended to put a layer of earth in the bottom of the coffin. The lahd (side niche) is sunnah where the soil allows it; otherwise a shaqq (trench) is used.
The four schools agree on this.
Explanation
The Prophet ﷺ and the Companions were buried directly in the earth, wrapped only in the kafan. The body is laid on its right side facing the qiblah, then covered. The four schools agree that a coffin is disliked when there is no need for it.
Lahd and shaqq. A lahd is a niche dug into the qiblah side of the grave, where the body is placed and closed off with bricks or boards. A shaqq is a trench in the middle of the grave. The lahd is sunnah in firm soil; in soft soil a shaqq is used.
When a coffin is fine:
- The soil is wet, sandy or likely to collapse.
- Local law or the cemetery requires a coffin or a grave liner.
- The body must be transported, or it is in a state where it cannot be carried without one.
In these cases there is no sin. Use a simple, plain coffin, avoid costly decoration, put some earth inside under the body if possible, and lay the body on its right side facing the qiblah. Many councils in the UK and cemeteries in the US now allow shroud-only burial in Muslim sections, so ask before assuming a coffin is needed.
Carrying the body to the grave in a coffin or on a bier and then lowering it without the coffin is fine, and it is what many Muslim cemeteries do. For the prayer before burial, see how to pray janazah.
The evidence
Quran, Surah Al-Mursalaat 77:25-26
أَلَمْ نَجْعَلِ ٱلْأَرْضَ كِفَاتًا ﴿٢٥﴾ أَحْيَآءًۭ وَأَمْوَٰتًۭا ﴿٢٦﴾
Have We not made the earth a container Of the living and the dead?
The earth itself is the container Allah made for the dead.
Sunan Abi Dawud 3208
Graded sahih... اللحد لنا والشق لغيرنا ...
"The lahd is for us and the trench is for others."
The niche grave is the preferred Muslim grave.
Sahih Muslim 966
Sahih... الحدوا لي لحدا وانصبوا علي اللبن نصبا ...
"Sa'd said: dig a lahd for me and set unbaked bricks upright over me, as was done for the Messenger of Allah."
This describes how the Prophet ﷺ was buried.
Where the ruling is recorded
- al-Hidaya, Kitab al-Salah, Bab al-Jana'iz, Fasl fi al-Dafn. The lahd is sunnah, and baked brick and wood in the grave are disliked.
- Radd al-Muhtar (Ibn Abidin), Kitab al-Salah, Bab Salat al-Janazah. A coffin is allowed when the soil is soft or wet, with earth spread inside it.
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.