Praise be to Allah, and may peace and blessings be upon the Messenger of Allah.
The Names of Allah are the names by which He has named Himself, or which have been established in His Book and the Sunnah of His Messenger ﷺ. Allah has made His servants acquainted with these Names so that they may know their Lord, believe in the meanings of perfection and majesty that they indicate, praise Him through them, and call upon Him by His Beautiful Names.
Allah تعالى says:
“And to Allah belong the Most Beautiful Names, so call upon Him by them, and leave those who deviate concerning His Names. They will be recompensed for what they used to do.” [Al-A'raf 7:180]
The Prophet ﷺ said:
“Allah has ninety-nine names, one hundred minus one; whoever enumerates them will enter Paradise.”
Narrated by al-Bukhari and Muslim.
Therefore, the Names of Allah must be honored, respected, and revered, and they should not be exposed to anything that could lead to their being treated disrespectfully or without due reverence.
Writing the Names of Allah on walls exposes them to circumstances that are inconsistent with the reverence they deserve. Walls may become covered with dust and dirt, and letters may fall away or the writing may become damaged, altering the appearance of the Name.
People or students may also write inappropriate phrases next to or beneath the Names, which could lead to the Names of Allah being treated disrespectfully or without proper reverence.
Therefore, using the writing of the Names of Allah on walls as a means of preventing offensive writing is not an appropriate method for achieving this purpose.
If the Names of Allah are written on walls with the intention of worshipping Allah and drawing closer to Him, this is not valid, because it has not been established that the Prophet ﷺ or his Companions used writing the Names of Allah on walls as an act of worship.
As for writing them merely to preserve the cleanliness of walls and prevent people from writing on them, this is also an inappropriate method, because it may result in the Names being treated disrespectfully and because it makes the sacred Names a means of achieving a worldly purpose.
A number of scholars have stated that writing the Qur'an and the Names of Allah on walls is disliked.
Ibn al-Humam, the Hanafi scholar, رحمه الله, said:
“It is disliked to write the Qur'an and the Names of Allah on coins, prayer niches, and walls.”
Al-Dardir, the Maliki scholar, رحمه الله, said regarding engraving Qur'anic verses and the Names of Allah on walls:
“It should be considered prohibited, because it leads to disrespecting them.”
Shaykh Ibn 'Uthaymeen, رحمه الله, said regarding writing verses on walls:
“As for writing verses on walls, whether in mosques or elsewhere, this is an innovation.”
He also mentioned that using verses as decorative inscriptions on walls may lead to a form of disrespect toward the Word of Allah.
It is not known that the Prophet ﷺ used to write the Qur'an, hadiths, or the Names of Allah on plaques to be hung on walls for decoration, seeking blessings, or reminding people.
Likewise, this was not known from the Rightly Guided Caliphs, the general body of the Companions, or the early scholars.
Had displaying the Names of Allah or Qur'anic verses on walls been a legitimate means of reminding people or decorating places, the Prophet ﷺ and his Companions would have been the first to do so, and there would have been evidence for it in the Sunnah.
For this reason, the Permanent Committee for Scholarly Research and Ifta' stated in its fatwas that displaying the Qur'an, hadiths, or the Names of Allah on walls for decoration or remembrance is not part of the guidance of the Prophet ﷺ or his Companions رضي الله عنهم.
Moreover, such writings may, over time, be subjected to neglect, damage, or being moved from one place to another, which could lead to their being treated disrespectfully.
If the goal is to prevent students from writing obscene or offensive material on school walls, it is better to use other means that do not expose the Names of Allah to anything that could undermine their proper reverence.
Instead, schools can use awareness campaigns, appropriate signs and instructions, supervision and monitoring, and suitable educational and administrative measures to address inappropriate behavior.
As for using the Names of Allah on walls as a means of preventing offensive writing, this is not an appropriate approach because of the potential disrespect that may result.
The Beautiful Names of Allah should not be written on walls, whether in schools or elsewhere, neither as an act of worship nor merely for decoration or as an attempt to prevent offensive writing. This is because doing so exposes the Names of Allah to dirt, damage, and possible disrespect, and because this practice has not been established from the Prophet ﷺ or his Companions.
Rather, the Names of Allah should be honored and protected, and other appropriate means should be used to maintain the cleanliness of walls and prevent inappropriate writing.
And Allah knows best.