|History(Christian)|History(Muslim)| Architecture | Inside | Mosaics |

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.

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 brothers, Gaspare and Giuseppe Fossati, 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. This work included covering the previously uncovered faces of two seraphim mosaics located in the centre of the building. The building currently features a total of four of these images and two of them are restorations in paint created by the Fossatis to replace two images of which they could find no surviving remains. In other cases, the Fossatis recreated damaged decorative mosaic patterns in paint, 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 an earthquake in 1894. These include a great mosaic of Christ Pantocrator in the dome, 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. The Fossatis also added a pulpit (minbar) and the four large medallions on the walls of the nave bearing the names of Muhammad and Islam's first caliphs.

Imperial Gate mosaic
Imperial Gate mosaics: located in the tympanum above the gate, used only by the emperors when entering the church. Based on style analysis, it has been dated to the late 9th or early 10th century. The emperor with a nimbus or halo could possibly represent emperor Leo VI the Wise or his son Constantine VII Porphyrogenitus bowing down before Christ Pantocrator, seated on a jeweled throne, giving His blessing and holding in His left hand an open book. The text on the book reads as follows : "Peace be with you. I am the light of the world". (John 20:19; 20:26; 8:12) On each side of Christ's shoulders is a circular medallion : on His left the Archangel Gabriel , holding a staff, on His right His Mother Mary. These mosaics express the timeless power bestowed by Christ on the Byzantine emperors.

Southwestern entrance mosaic
Southwestern entrance mosaics, situated in the tympanum of the southwestern entrance, date from 944. They were rediscovered during the restorations of 1849 by Fossati. The Virgin sits on a throne without a back, her feet resting on a pedestal, embellished with precious stones. The Child Christ sits on her lap, giving His blessing and holding a scroll in His left hand. On her left side stands emperor Constantine in ceremonial attire, presenting a model of the city to Mary. The inscription next to him says : "Great emperor Constantine of the Saints". On her right side stands emperor Justinian I, offering a model of the Hagia Sophia. The medallions on both sides of the Virgin's head carry the monograms MP and ΘY, an abbreviation of "Mētēr" and "Theou", meaning "Mother of God".

Apse mosaics
Virgin and Child: this was the first of the post-iconoclastic mosaics. It was inaugurated on 29 March 867 by Patriarch Photius and the emperors Michael III and Basil I. This mosaic is situated in a high location on the half dome of the apse. Mary is sitting on a throne without a back, holding the Child Jesus on her lap. Her feet rest on a pedestal. Both the pedestal and the throne are adorned with precious stones. These mosaics are believed to be a reconstruction of the mosaics of the sixth century that were previously destroyed during the iconoclastic era. The mosaics are set against the original golden background of the 6th century. The portraits of the archangels Gabriel and Michael (largely destroyed) in the bema of the arch also date from the 9th century.

Emperor Alexander mosaic
The Emperor Alexander mosaic is not easy to find for the first-time visitor, located in the second floor in a dark corner of the ceiling. It depicts Emperor Alexander in full regalia, holding a scroll in his right hand and a globus cruciger in his left. A drawing by Fossati showed that the mosaic survived until 1849, and that Thomas Whittemore, founder of the Byzantine Institute of America who was granted permission to preserve the mosaics, assumed that it had been destroyed in the earthquake of 1894. Eight years after his death, the mosaic was discovered in 1958 largely through the researches of Robert Van Nice. Unlike most of the other mosaics in Hagia Sophia, which had been covered over by ordinary plaster, the Alexander mosaic was simply painted over and reflected the surrounding mosaic patterns and thus was well hidden. It was duly cleaned by the Byzantine Institute's successor to Whittemore, Paul A. Underwood.

Empress Zoe mosaics
The Empress Zoe mosaics on the eastern wall of the southern gallery date from the 11th century. Christ Pantocrator, clad in the dark blue robe (as always the custom in Byzantine art), is seated in the middle against a golden background, giving His blessing with the right hand and holding the Bible in His left hand. On either side of His head are the monograms IC and XC, meaning Iēsous Khristos. He is flanked by Constantine IX Monomachus and Empress Zoe, both in ceremonial costumes. He is offering a purse, as symbol of the donation he made to the church, while she is holding a scroll, symbol of the donations she made. The inscription over the head of the emperor says : "Constantine, pious emperor in Christ the God, king of the Romans, Monomachus". The inscription over the head of the empress reads as follows : "Zoë, the very pious Augusta". The previous heads have been scraped off and replaced by the three present ones. Perhaps the earlier mosaic showed her first husband Romanus III Argyrus or her adopted son Michael IV. Another theory is that these mosaics were made for an earlier emperor and empress, with their heads changed into the present ones.

Comnenus mosaics
The Comnenus mosaics, equally located on the eastern wall of the southern gallery, date from 1122. The Virgin Mary is standing in the middle, depicted, as usual in Byzantine art, in a dark blue gown. She holds the Child Christ on her lap. He gives His blessing with His right hand while holding a scroll in His left hand. On her right side stands emperor John II Comnenus, represented in a garb embellished with precious stones. He holds a purse, symbol of an imperial donation to the church. Empress Irene stands on the left side of the Virgin, wearing ceremonial garments and offering a document. Their eldest son Alexius Comnenus is represented on an adjacent pilaster. His mournful features reflect his death from tuberculosis in the same year. In this panel one can already see a difference with the Empress Zoe mosaics that is one century older. There is a more realistic expression in the portraits instead of an idealized representation. The empress is shown with plaited blond hair, rosy cheeks and grey eyes, revealing her Hungarian descent. The emperor is depicted in a dignified manner.

Deësis mosaic
The Deësis ('Δέησις' in Greek, meaning Entreaty) mosaic probably dates from 1261. It was commissioned to mark the end of 57 years of Roman Catholic use and the return to the Orthodox faith. It is the third panel situated in the imperial enclosure of the upper galleries. It is widely considered the finest in Hagia Sophia, because of the softness of the features, the humane expressions and the tones of the mosaic. The style is close to that of the Italian painters of the late 13th or early 14th century, such as Duccio. In this panel the Virgin Mary and John the Baptist (Ioannes Prodromos), both shown in three-quarters profile, are imploring the intercession of Christ Pantocrator for humanity on Judgment Day. The bottom part of this mosaic is badly deteriorated, probably due to rain since the mosaic is next to the windows. This mosaic is considered as the beginning of the Renaissance in Byzantine pictorial art.

Northern tympanon mosaics
The northern tympanon mosaics feature various saints. They have been able to survive due to the very high and unreachable location. They depict Saints John Chrysostom and Ignatius the Younger standing, clothed in white robes with crosses, and holding richly jewelled Holy Bibles. The names of each saint is given around the statues in Greek, in order to enable an identification for the visitor. The other mosaics in the other tympani have not survived probably due to the frequent earthquakes as opposed to any deliberate destruction by the Ottoman conquerors.

20th-century restoration
A large number of mosaics were uncovered in the 1930s by a team from the Byzantine Institute of America led by Thomas Whittemore. The team chose to let a number of simple cross images remain covered by plaster, but uncovered all major mosaics found.

Because of its long history as both a church and a mosque, a particular challenge arises in the restoration process. The Christian iconographic mosaics are being gradually uncovered. However, in order to do so, important, historic Islamic art would have to be destroyed. Restorers have attempted to maintain a balance between both Christian and Islamic cultures. In particular, much controversy rests upon whether the Islamic calligraphy on the dome of the cathedral should be removed, in order to permit the underlying Pantocrator mosaic of Christ as Master of the World, to be exhibited (assuming the mosaic still exists).