View of Ljubljana city with castle hill and mountains in Slovenia
By Rail

Slovenia & Croatia by train

SZ and HZ across two scenic neighbours.

By the Viamo editorial team · Editor Terje Moy · Last updated July 2026 · 4 min read

Slovenia and Croatia are small countries and near neighbours, linked by a busy rail corridor through their capitals. The Slovenian operator (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:

The Bohinj Railway: The line from Jesenice through the Julian Alps to Nova Gorica — skirting the Triglav region — is one of the most scenic routes in Central Europe. It is slower than the main line but well worth a day's detour for the views.
White and red houses beside the sea in Dubrovnik Croatia old town

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:

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: