Most travellers make Yogyakarta (Jogja) their main stop on their way from Bali to Jakarta by Bus.
Bali to Yogyakarta by Bus
The route to Bali to Yogyakarta by bus with the most to offer is probably via Malang, a large town set in the highlands of East Java. This area was the last centre of Javanese Hinduism and the surrounding countryside is dotted with Hindu temples dedicated to Siva. With the spread of Islam through Java, the Hindu kings fled to Bali with their courts. This layering of one religion on another has led to the local adaptation and syncretism that makes Javanese culture so interesting.
Take the overnight bus to Malang, and make it your base while climbing Mt Bromo, visiting Majapahit temples or the southern coastline.
Solo (Surakarta) is another possible side trip on the way to Jogja. Most buses or trains going to Jogja passes through Solo. Renowned for its batik and courtly lifestyle, Solo gives one a glimpse of a more traditional Java that beats to a slower rhythm.
Yogyakarta to Jakarta by Bus
There are direct overnight buses from Jogja or Solo to Bandung and Jakarta; or train from Jogja to Bandung and Jakarta. To Pangandaran Beach take the train or day bus to Banjar, then mini-bus to Pangandaran market, and then becak to the beach. From Bandung to Jakarta the Express train to Gambir Station is recommended, or shuttle bus to your hotels as airport ($10pp).
For those with more time the route through Cianjur, Sukabumi and Bogor can be most rewarding. Sukabumi is well worth a day or two. Not far from town is the Selabintana resort and to the south of town are some well maintained springs at Santa. West Java is famous for its hot springs. Ciater is probably the hottest and also one of the most frequented. When in Bandung, try to get a lift with someone going to Ciater for an evening swim. What a way to warm yourself up for the night! While the springs at Santa may not be as deep or as hot, the peaceful surroundings allow one’s mind and body to cleanse themselves of all the woes of being on the road.
The road that cuts between Mt. Pangrango (3019m) and Mt. Salak (2211m) reaches the plain at Bogor. The Bogor Palace which dates to Dutch times is at Bogor, as are many teaching and research institutes. For the contemporary residents of Jakarta, escape from the oppressive humidity can be found at Puncak, though the twisting road can be a bit hairy. During Dutch times a rest at Bogor was often prescribed by doctors for those in ill health.
From Jakarta you can fly to most countries; or if continuing overland, take a bus to the Merak ferry terminal and then train or bus through Sumatra.
https://balijavapocketguide.com/bali-to-yogyakarta-by-bus/
https://balijavapocketguide.com/yogyakarta-to-jakarta-by-train/
Bali to Jakarta by Bus