Hagia Sophia or Ayasofya in Turkish is one of the most visited landmarks in Istanbul. Although from the outside it resembles a typical mosque, inside you'll discover some Christian mosaics along with Islamic elements. The thing is that it was originally constructed in 537 AD as Greek Orthodox church. The very name stems from Greek and means "holy wisdom." Only when the Turkish conquered Constantinople in 1453, they converted this Christian basilica into the imperial mosque. And eventually, in 1935 it ended up as a museum and is highly valued as one of the world's best surviving jewels of Byzantine architecture.
Today, Hagia Sophia is one of Istanbul's most visited tourist attractions. It operates all year round, but the hours differ depending on the season. In the summer season from mid-April through October, it's open from 9 am to 7 pm, the last admission at 6 pm. In the winter season, it closes earlier at 5 pm, the latest entry at 4 pm. Generally, the busiest months are April–May and September–October. During these months, the best time to visit Hagia Sophia is either early morning or better with the last admission when crowds thin out. However, to skip the line, you could also buy tickets or museum pass online, as well as book a tour.
In the low season, that's June–August (it's just too hot) and November–March, the queues are less long. The least busy months are December–February, least crowded and hence best for photo shooting.
As to the best time of the week, we advise avoiding weekends as they tend to be more crowded than weekdays. Also, Friday mornings typically have a greater tourist flow because of another nearby tourist attraction, the Blue Mosque, being closed for the prayer. Wednesdays and Thursdays are deemed the best.
At last, when you see a distinct queue inside, be sure these people are waiting for the Wish Column, also known as Sweating Column. According to a popular belief, you make a wish and stick your finger into the hole in the column and rotate it clockwise. On condition it gets wet, your wish is to come true.