The church was richly decorated with mosaics throughout the centuries. They either depicted the Virgin Mother, Jesus, saints, or emperors and empresses. Other parts were decorated in a purely decorative style with geometric patterns.
The mosaics however for their most part date to after the end of the Byzantine Iconoclasm of 800 AD.
During the Sack of Constantinople in 1204, the Latin Crusaders vandalized valuable items in every important Byzantine structure of the city, including the golden mosaics of the Hagia Sophia. Many of these items were shipped to Venice, whose Doge, Enrico Dandolo, had organized the invasion and sack of Constantinople.
Following the building's conversion into a mosque in 1453, many of its mosaics were covered with plaster, due to Islam's ban on representational imagery. This process was not completed at once, and reports exist from the 17th century in which travellers note that they could still see Christian images in the former church. In 1847–49, the building was restored by two Swiss Italian Fossati brothers, Gaspare and Giuseppe, and Sultan Abdülmecid allowed them to also document any mosaics they might discover during this process. This work did not include repairing the mosaics and after recording the details about an image, the Fossatis painted it over again. The Fossatis restored the mosaics of the two hexapteryga (singular Greek: εξαπτέρυγον, pr. hexapterygon, six-winged angel); it is uncertain whether they are seraphim or cherubim) located on the two east pendentives, covering their faces again before the end of the restoration.[62] The other two placed on the west pendentives are copies in paint created by the Fossatis, since they could find no surviving remains of them.[62] As in this case, the architects reproduced in paint damaged decorative mosaic patterns, sometimes redesigning them in the process. The Fossati records are the primary sources about a number of mosaic images now believed to have been completely or partially destroyed in the 1894 Istanbul earthquake. These include a mosaic over a now-unidentified Door of the Poor, a large image of a jewel-encrusted cross, and a large number of images of angels, saints, patriarchs, and church fathers. Most of the missing images were located in the building's two tympana.
One mosaic they documented is Christ Pantocrator in a circle, which would indicate it to be a ceiling mosaic, possibly even of the main dome which was later covered and painted over with Islamic calligraphy that expounds God as the light of the universe. The drawings of the Hagia Sophia mosaics are today kept in the Cantonal Archive of Ticino.[