Turkey is overwhelmingly Muslim, around 96 to 99 percent by most estimates including Pew Research's Religious Composition of the World, 2010-2020, with a Sunni Hanafi majority and a substantial Alevi minority, a heterodox tradition drawing on Shia, Sufi and Anatolian folk elements, estimated at somewhere between 10 and 20 percent of the population though precise figures are contested since Alevis are not separately counted in official statistics.
Anatolia's religious history predates Islam considerably: it was a heartland of early Christianity, home to seven of the churches addressed in the Book of Revelation and to the Cappadocian Fathers who shaped Christian doctrine in the fourth century, and Constantinople, refounded as Istanbul after the 1453 Ottoman conquest, served as the seat of the Byzantine Orthodox Church for over a thousand years before becoming the center of Ottoman Sunni Islam.
The Hagia Sophia, built as a cathedral under Justinian in 537, converted to a mosque in 1453, secularized as a museum in 1934 under Ataturk's reforms, and reconverted to a mosque in 2020, embodies these successive religious transformations in a single building. Christian and Jewish minorities, protected historically under the Ottoman millet system, have shrunk dramatically since the early twentieth century through the Armenian Genocide, the 1923 population exchange with Greece, and later emigration.