The Blue Mosque and Hagia Sophia face each other across Sultanahmet Square, about 5 minutes' walk apart. Hagia Sophia was built in 537 as a Byzantine cathedral; the Blue Mosque was built from 1609 to 1617 as an Ottoman mosque. The Blue Mosque is free to enter, while foreign visitors pay €25 for Hagia Sophia's visitors' route with the upper gallery. You can easily visit both in one morning.
Blue Mosque vs Hagia Sophia at a glance
| Blue Mosque | Hagia Sophia | |
|---|---|---|
| Built | 1609–1617, for Sultan Ahmed I | 537, under Emperor Justinian |
| Original function | Mosque | Byzantine cathedral |
| Later history | Always a mosque | Mosque from 1453, museum from 1934, mosque again since 2020 |
| Entry | Free for everyone | Ground floor for worshippers; foreign visitors pay €25 for the visitors' route with the upper gallery (since January 2024); children under 8 free |
| Dress code | Modest clothing, women cover their hair, shoes off | The same, as it is a mosque again |
| Closed to visitors | Around the five daily prayers; Friday mornings | Check the visitors' route times on the day |
| Highlights | 21,043 Iznik tiles, six minarets, central dome 43 m high | Byzantine architecture, the upper gallery and its centuries of history |
What is the difference between the Blue Mosque and Hagia Sophia?
The biggest difference is age and origin. Hagia Sophia is more than a thousand years older: it was built in 537 as the cathedral of Byzantine Constantinople, became a mosque after the Ottoman conquest in 1453, served as a museum from 1934 and has been a mosque again since 2020. The Blue Mosque was built as a mosque from 1609 to 1617 and has never been anything else.
Architecturally, the Blue Mosque is in a way Hagia Sophia's answer. Its central dome with semi-domes builds on the idea that Hagia Sophia introduced, refined by Ottoman architects such as Mimar Sinan. Inside, the Blue Mosque is all Ottoman tiles and painted decoration, while Hagia Sophia shows layers of Byzantine and Ottoman history in one building. Read more about the architecture of the Blue Mosque.
Is Hagia Sophia free like the Blue Mosque?
Not for foreign visitors. Since 15 January 2024, foreign visitors pay €25 for the visitors' route of Hagia Sophia, which includes the upper gallery; children under 8 go free. The ground floor is used by worshippers for prayer. The Blue Mosque, by contrast, is free for everyone and needs no ticket at all, as explained on our page about Blue Mosque tickets and tours.
Dress code for both
Both buildings are working mosques, so the same rules apply: shoulders, arms and legs covered, women cover their hair, and shoes come off. Dress for both from the start and you won't need to change in between. Details are in our dress code and etiquette guide.
Which should you visit first?
Start with the Blue Mosque at about 8:30, when it opens to visitors and the queue is usually short. The morning window before the midday prayer is the longest of the day. Then cross Sultanahmet Square to Hagia Sophia. If you are visiting on a Friday, reverse the order: the Blue Mosque only opens to visitors from about 14:30, so see Hagia Sophia in the morning.
Can you visit the Blue Mosque and Hagia Sophia in one morning?
Yes. Allow 30 to 45 minutes for the Blue Mosque, about 5 minutes to walk across the square and time for Hagia Sophia's queue and visit. A relaxed morning could look like this:
- Blue Mosque at opening time, including the courtyard.
- A short walk along the Hippodrome.
- Hagia Sophia, with the upper gallery on the visitors' route.
- Coffee in the Arasta Bazaar or on to the Basilica Cistern.
The Blue Mosque closes to visitors around prayer times, so check the Blue Mosque opening hours and the day's prayer times before you set out. More ideas are on our page with things to do nearby.
Getting from one to the other
The walk from the Blue Mosque to Hagia Sophia takes about 5 minutes: leave the courtyard on the side facing Sultanahmet Square and walk straight across the square and its gardens. Both are close to the Sultanahmet stop of tram T1, so you can arrive and leave by tram.
Tours that combine both
Most guided tours of Sultanahmet include both the Blue Mosque and Hagia Sophia, often together with the Hippodrome, the Basilica Cistern or Topkapı Palace. A guide explains how the two buildings relate to each other and plans the route around the prayers. Check whether Hagia Sophia's €25 fee is included in the tour price, and compare the tours below.
Which is more impressive?
There is no wrong answer. The Blue Mosque impresses with its harmony, its six minarets and the colour of its tiles; Hagia Sophia with its age, its scale for a 6th-century building and the many layers of its history. Seeing them one after the other, on the same square, is what makes Sultanahmet unique.
Book tickets and tours
Istanbul: Blue Mosque & Hagia Sophia Guided Tour with Tickets (opens Viator in a new tab)
- 2.5 hours
- Free cancellation
Istanbul Old City Tour: Hagia Sophia, Blue Mosque & Grand Bazaar (opens Viator in a new tab)
- 4 hours
- Free cancellation
Istanbul Blue Mosque, Hagia Sophia, Basilica Cistern with Tickets (opens Viator in a new tab)
- 3 hours
- Free cancellation
Istanbul City Tour with Hagia Sophia and Blue Mosque (opens Viator in a new tab)
- 3–4 hours
- Free cancellation
Istanbul Mosques Walking Tour: Hagia Sophia and Blue Mosque (opens Viator in a new tab)
- 4 hours
- Free cancellation
Hagia Sophia and Blue Mosque Tour Skip-the-Line SMALL GROUP (opens Viator in a new tab)
- 3 hours
- Free cancellation
Prices and availability come from Viator. When you book through these links, we may earn a commission at no extra cost to you.