
On a map Semarang looks an easy trip north from Yogyakarta, and by rail via Solo it is only about 170km. But no fast train runs straight through, so you choose between one long direct ride and a quicker journey with a change.
The direct train: the morning Joglosemarkerto leaves Yogyakarta Tugu and runs west through Wates, Kutoarjo, Kebumen and Kroya to Purwokerto, then turns north over the hills via Bumiayu and Prupuk to Tegal, and follows the north coast east through Pekalongan to Semarang Poncol and Semarang Tawang in the early afternoon. It takes around seven hours and carries eksekutif and new-generation ekonomi carriages. The train is a loop service linking Jogja, Solo, Semarang and Purwokerto, which explains the roundabout route.
The quicker way, via Solo: take the KRL commuter line from Yogyakarta to Solo Balapan, about an hour, then the Banyubiru north through Gundih and Kedungjati to Semarang Tawang, about two hours. With time for the change, expect roughly three and a half to four hours in total. Buy the KRL leg at the station or through the commuter app; the Banyubiru is booked in Access by KAI like any long-distance train.
Which to choose: for most travellers, changing at Solo is the better plan, and it lets you pick a departure time rather than being tied to one morning train. The direct Joglosemarkerto suits anyone who wants a relaxed day on one train, with the climb between Purwokerto and Tegal the most scenic stretch. It is one of KAI's busiest regional services, so book early around holidays.
Check current departures and fares in Access by KAI. For the opposite direction, see Semarang to Yogyakarta; for the two legs of the faster route, see Yogyakarta to Solo and Solo to Semarang.
Journey times vary by service and season. Confirm against current schedules before booking.
Categories
Last updated 10 Oct 2026
© Indonesia By Train 2026. All rights reserved