Yogyakarta, the Living Royal City: History, Temples and a 3-Day Plan
Muhammad Fikri Gunawan · · 8 min read
Yogyakarta (Jogja) was founded as a royal city in 1756 and served as Indonesia's capital from 1946 to 1949. Here is its story, the best places to see, and how to plan your trip.
Yogyakarta, also spelled Jogjakarta and shortened to Jogja, was founded as a royal city when Sultan Hamengkubuwono I moved into the new Kraton on 7 October 1756, after the Giyanti Agreement of 13 February 1755 split the Mataram Sultanate in two. It served as the capital of the Republic of Indonesia from January 1946 to 1949, and its sultan still governs the Special Region of Yogyakarta today.
Visitors come for the Kraton, the Taman Sari water castle and lively Malioboro Street, and for the great temples of Borobudur and Prambanan nearby. This guide gives you the short history first, then the places, transport and timing you need to plan a trip.
Key takeaways
- Founding date: the city celebrates 7 October 1756, when the Kraton became the sultan's residence.
- Two roles: a living royal city and a student city, home to Gadjah Mada University.
- Best stops: Tugu Yogyakarta, Malioboro, the Kraton, Taman Sari, Prambanan and Borobudur.
- UNESCO: the Cosmological Axis of Yogyakarta was inscribed as a World Heritage property in 2023, and Borobudur and Prambanan have been listed since 1991.
- Plan 3 days. The dry season is usually the most comfortable time to visit.
A short history of Yogyakarta
Before 1755: the Mataram Sultanate
The Islamic Mataram Sultanate ruled much of Central Java from the late 1500s, with an early capital at Kotagede, which today is a quarter famous for silver crafts. Long succession disputes and growing influence from the Dutch East India Company (VOC) weakened the court.
1755: the Giyanti Agreement
On 13 February 1755 the Giyanti Agreement divided Mataram into the Sultanate of Yogyakarta and the Sunanate of Surakarta. Prince Mangkubumi became Sultan Hamengkubuwono I and built a new palace, the Kraton Ngayogyakarta Hadiningrat. He moved in on 7 October 1756, the date the city celebrates as its anniversary.
1756 to 1945: a living royal city
The sultan built the Taman Sari water garden from 1758. Tugu Yogyakarta, the white monument north of the palace, was destroyed by the 1867 earthquake and rebuilt in its present form in 1889. Yogyakarta also became a center of education and reform, and Muhammadiyah was founded here in 1912.
1945 to 1949: capital of the Republic
On 5 September 1945 Sultan Hamengkubuwono IX and Paku Alam VIII declared their domain part of the Republic of Indonesia. When Dutch forces held Jakarta, the government moved to Yogyakarta on 4 January 1946. In the General Attack of 1 March 1949, Indonesian forces briefly retook the city, and Gadjah Mada University was founded in Yogyakarta in December 1949.
Why is Yogyakarta a special region?
Because the Sultan of Yogyakarta and Paku Alam VIII backed the Republic from the start and supported the capital's move in 1946, Yogyakarta kept a special status. Today it is the Special Region of Yogyakarta (DIY), and the reigning sultan serves as governor.
Why travel to Yogyakarta
- Living heritage: the Kraton is still the sultan's residence and a center of Javanese court culture.
- Temples: Borobudur is the world's largest Buddhist temple and Prambanan is the largest Hindu temple complex in Indonesia.
- Food: gudeg, bakpia, sate klathak, kopi joss and street-side angkringan stalls.
- Crafts: batik, silver in Kotagede and leather puppets.
- Student energy: affordable cafés, galleries and music thanks to the many universities.
- Easy to enjoy: the main sights are close together, and the city is friendly to first-time visitors.
Best places to visit in Yogyakarta
Tugu Yogyakarta

Tugu Yogyakarta is the white monument with a golden top that marks the north end of the city's main axis. The axis runs from Tugu through Malioboro to the Kraton, and the Cosmological Axis of Yogyakarta and its Historic Landmarks was added to the UNESCO World Heritage List in 2023. Visit at dusk for the soft light.
Malioboro Street

Malioboro is the best-known street in Yogyakarta, running south from Tugu station toward the Kraton. It is lined with batik shops, souvenir stalls and food vendors, and it is busiest in the evening. Bargain politely, and try a becak or andong (horse cart) ride for a short trip.
Kraton Ngayogyakarta Hadiningrat

The Sultan's Palace is still the home of the sultan, and parts of it are open as a museum. Court servants (abdi dalem) in traditional dress guide visitors, and gamelan music and dance are performed on certain days. Dress modestly and check opening hours, because the palace closes at set times and for ceremonies.
Taman Sari Water Castle

Built from 1758, Taman Sari was a royal garden with bathing pools, pavilions and underground passages. Its highlight is Sumur Gumuling, an underground mosque with a circular stairway. Go in the morning before the heat, and let a local guide show you the hidden corners.
Prambanan Temple

Prambanan is a 9th-century Hindu temple complex about 17 kilometers east of the city, with the main Shiva temple rising to roughly 47 meters. Reliefs on the temples tell the Ramayana story, and open-air Ramayana ballet performances are staged nearby on certain nights. Trains on the Yogyakarta–Solo commuter line stop at Prambanan station.
Borobudur Temple

Borobudur is a 9th-century Buddhist monument in Magelang, Central Java, about 40 kilometers northwest of Yogyakarta. It has more than 2,000 relief panels and hundreds of Buddha statues. Access to the upper terraces is limited and needs advance booking, so check the official channel before you go. Sunrise views are famous but depend on the weather.
How to get to and around Yogyakarta
- By air: Yogyakarta International Airport (YIA) in Kulon Progo is the main airport, and a flight from Jakarta takes about an hour and a quarter. An airport train runs to Yogyakarta Station (Tugu).
- By train: long-distance trains from Jakarta take roughly 6 to 8 hours and arrive at Tugu or Lempuyangan station.
- Around the city: Trans Jogja buses, becak, andong and ride-hailing apps such as Gojek and Grab. The old center and Malioboro are easy to walk.
- To the temples: the Yogyakarta–Solo commuter line stops at Prambanan, while Borobudur is best reached by tour, car with driver or ride-hailing.
Best time to visit Yogyakarta
Yogyakarta is warm all year, usually around 24 to 32 degrees Celsius. The dry season, roughly May to September, is the most comfortable for temples and walking. The rainy season, roughly November to March, brings afternoon downpours, so carry a light rain jacket. Major palace events such as Sekaten and Grebeg follow the Islamic calendar and draw crowds, and school holidays are busy. Check volcano and temple access updates before you travel.
A 3-day Yogyakarta itinerary
- Day 1 morning: Tugu Yogyakarta and a walk down Malioboro.
- Day 1 afternoon: the Kraton and Taman Sari.
- Day 1 evening: dinner at an angkringan or a gudeg restaurant, then a stroll on Malioboro.
- Day 2 morning: Borobudur, ideally early before the heat.
- Day 2 afternoon: Prambanan, and a Ramayana ballet if one is scheduled.
- Day 3: Kotagede for silver crafts, a batik workshop or museum, and a last gudeg lunch.
Traveling from the capital? Start with the history of Jakarta, or continue to West Java with the history of Bandung.
Practical tips
- Start early. Mornings are cooler and the temples are less crowded.
- Dress modestly at the Kraton and other places of worship.
- Carry water, sunscreen and a hat.
- Book Borobudur access in advance and check opening hours on official pages.
- Use ride-hailing apps or agree on fares before you start a becak ride.
Frequently asked questions
When was Yogyakarta founded?
The Giyanti Agreement of 13 February 1755 created the Sultanate of Yogyakarta. The Kraton became the sultan's residence on 7 October 1756, which the city celebrates as its anniversary.
Is Yogyakarta the same as Jogja?
Yes. Jogja, Jogjakarta and Yogyakarta all mean the same city. Jogja is the common short form used in daily speech.
How many days do you need in Yogyakarta?
Three days are enough for the city center, Borobudur and Prambanan. Add a day for Kotagede and slower exploring.
Is Borobudur inside Yogyakarta?
No. Borobudur is in Magelang, Central Java, about 40 kilometers northwest of Yogyakarta, and most visitors reach it as a day trip from the city.



