Slovenia and Croatia are small countries and near neighbours, linked by a busy rail corridor through their capitals. The Slovenian operator SŽ (Slovenske železnice) runs a compact but beautiful network through Alpine passes and river gorges; Croatia's HŽ Putnički Prijevoz covers the country from the Pannonian plains to the Adriatic — though reaching the coast by rail is more complicated than many visitors expect. Here is what the train can and cannot do in both countries.
Slovenia by rail: compact and scenic
Slovenia is a small country, and its trains reflect that — most journeys are under two hours. Ljubljana is the hub, with lines heading north toward Austria, east to Croatia, west toward Italy and the coast, and south via Pivka to the Karst and Koper. The SŽ network is well maintained by regional standards, and reservations are not generally required on domestic services.
Key Slovenian routes:
- Ljubljana to Maribor — about 2 hours on faster services; a pleasant journey through central Slovenia.
- Ljubljana to Koper (coast) — about 2 hours 30 minutes; the route climbs the Karst Plateau and descends to the Adriatic — a surprisingly dramatic journey for a short distance.
- Ljubljana to Nova Gorica / Italian border — scenic Soča river valley is nearby; the Bohinjska line from Jesenice to Nova Gorica is considered one of the most beautiful rail journeys in the region.
- Ljubljana to Villach (Austria) — an international connection through the Karawanken Alps, taking about 2 hours 30 minutes.

The Ljubljana to Zagreb connection
The flagship international service between the two capitals takes around 2 hours on the fastest ICS (InterCity Slovenia) trains, making it one of the most useful cross-border train journeys in the Balkans. Services run several times a day and a reservation is generally required (or at least strongly recommended). The route passes through rolling hills and crosses the Slovenian–Croatian border smoothly.
This is a natural building block for broader Balkan itineraries — continuing from Zagreb to Split, Bosnia or onward to Belgrade. For the bigger picture, see Eastern Europe by train.
Croatia by rail: good inland, limited to the coast
Zagreb is the heart of the Croatian rail network. From here, HŽ trains run south to Split and east toward Slavonia. The key caveat that surprises many visitors: Dubrovnik has no railway. The city is not connected to the national rail network at all, and travel there requires a bus or ferry from Split or Zadar.
Key Croatian routes:
- Zagreb to Split — roughly 5 hours 30 minutes on faster services; the line cuts through Lika and the Dalmatian hinterland. A scenic route that is slower than the bus in some comparisons, but more comfortable and the views are good.
- Zagreb to Rijeka — about 4 hours; the route traverses Gorski Kotar, a forested highland region. The train to Rijeka is a classic Croatian rail journey.
- Zagreb to Osijek (Slavonia) — about 4 hours; the flat eastern region, good for those visiting Kopački Rit nature reserve.
- Zagreb to Budapest (Hungary) — direct InterCity trains in about 6 hours; a key international connection.
- Zagreb to Belgrade (Serbia) — roughly 6 to 7 hours by direct service.
Reservations and tickets
On SŽ trains within Slovenia, reservations are not required on most domestic services. On the Ljubljana–Zagreb international route, a reservation is required or strongly recommended. On HŽ's faster domestic services (ICS), a reservation is advisable.
Tickets for SŽ can be bought at Slovenian stations or online (sz.si). HŽ tickets are available at Croatian stations or via the HŽ Putnički Prijevoz website. Both systems are accessible in English, though international payment on older booking systems can occasionally be tricky.
Both Interrail and Eurail are valid in Slovenia and Croatia. Reservation fees on ICS trains are an additional cost for pass holders. See seat reservations explained for the detail on how this works.
Getting to the Dalmatian coast
Outside of Split, which has a rail connection from Zagreb, the Dalmatian coast is largely served by buses (often comfortable and well-patronised) and ferries. Zadar has no rail connection; Dubrovnik is not on the network. For coastal travel, ferries — including Jadrolinija services along the islands — are an excellent complement to rail for the Croatian coast.
Frequently asked questions
Is there a direct train from Ljubljana to Zagreb?
Yes. ICS trains run several times a day and take about 2 hours. A reservation is required or recommended. It is one of the most reliable cross-border rail links in the western Balkans.
Can I get to Dubrovnik by train?
No — Dubrovnik is not connected to the railway. The standard approach is to take the train to Split and then a ferry or bus along the coast. Buses from Zagreb also run direct to Dubrovnik.
Is the Ljubljana–Koper train route scenic?
Very much so. The line climbs the Karst plateau and descends steeply to the Adriatic coast, with impressive views. The Bohinj Railway (Jesenice to Nova Gorica) is another notable scenic option in Slovenia.
Do I need an Interrail reservation in Slovenia and Croatia?
On most domestic Slovenian services, no reservation is needed. On the Ljubljana–Zagreb international service and HŽ's faster trains in Croatia, a reservation is required or recommended and costs a small supplement. Regional trains in both countries are covered by pass with no surcharge.
Sources and further reading:
- Slovenian timetables and tickets: SŽ (sz.si).
- Croatian timetables and tickets: HŽ Putnički Prijevoz (hzpp.hr).
- Pass information: Interrail, Eurail.
- Regional rail overview: The Man in Seat 61.
