Traveling Slovenia by Train: Routes Between Ljubljana, Maribor and the Coast
Getting Around

Traveling Slovenia by Train: Routes Between Ljubljana, Maribor and the Coast

Quick Answer

Can you travel around Slovenia by train?

Yes, for the country's larger towns: Ljubljana, Maribor, Celje, Ptuj and the port of Koper all sit on the Slovenske Železnice (SŽ) network, with several trains a day between them. Lake Bled, Postojna Cave and Kranjska Gora are not on the railway itself — the nearest station is a bus, taxi or walk away, so plan a short connection for those.

What the Slovenian Railway Actually Connects

Slovenia is small enough that a car feels like the default way to see it, but for a specific kind of trip — city to city, no detours — the train is the calmer option. The national operator, Slovenske Železnice (SŽ), runs a modest but useful network radiating out from Ljubljana: east to Maribor, south-west toward the coast, north toward the Austrian border, and a short hop into Croatia. If your itinerary is built around towns that sit directly on these lines, the train is genuinely competitive with driving, cheaper than a rental car once you add fuel and the vignette, and a lot less stressful in an unfamiliar city center.

What it will not do is take you to most of the things people actually come to Slovenia to see. Lake Bled, Postojna Cave, the Škocjan Caves, Kranjska Gora, the Soča Valley and Piran are either off the railway entirely or served by a station that sits a bus ride from the actual sight. That gap is the single most common planning mistake for first-time visitors working from a European rail map: the line looks like it goes to Bled, and in a sense it does, but not to the lake.

This guide covers only the intercity network itself — routes, journey times, tickets and stations. For the bus network that fills in everywhere the railway doesn’t reach, see the Slovenia intercity bus guide; for the last-mile connections to Bled and Postojna specifically, see how to get to Bled without a car and how to get to Postojna without a car.

The Network at a Glance

Slovenia’s rail map is essentially a handful of lines meeting at a small number of junctions, the most important being Zidani Most, where the route east toward Maribor and Celje splits from the route south toward Croatia. From Ljubljana, four corridors matter for a typical visit:

CorridorMain stopsApprox. journey timeWhat it’s useful for
Ljubljana – MariborZidani Most, Celje, Pragersko~2 hours (ICS)Second city, wine country access
Ljubljana – KoperPostojna, Pivka, Divača~2h15–2h30Coast, with a transfer at the end
Ljubljana – JeseniceKranj, Lesce-Bled~50–70 minutesGateway to Bled and the Alps, by connection
Ljubljana – Zagreb (Croatia)Zidani Most, Dobova~2h10Cross-border, no change of train

These times are approximate — regional trains that stop everywhere take noticeably longer than the InterCity Slovenija services, and SŽ’s own timetable and booking tools (available online and through station counters) show exact departures for the day you’re traveling.

Ljubljana to Maribor: The Backbone Route East

The Ljubljana–Maribor line is the closest thing Slovenia has to a rail backbone, and it’s the one route on this list that behaves exactly like you’d expect: the train drops you in the city center, no onward bus required. Along the way it passes through Celje, a useful stop if you’re breaking the journey, and continues to Pragersko, where a branch line splits off toward Ptuj — Slovenia’s oldest town, and one that’s easy to fold into a Maribor day rather than treating as a separate trip.

Two types of train run this route: InterCity Slovenija (ICS), Slovenia’s tilting trains, which cover the distance in around two hours with a handful of stops and a mandatory seat reservation included in the ticket; and regional trains, slower but cheaper, stopping at nearly every town between the two cities. For a one-day return trip, the ICS is worth the modest extra cost simply to get more time in Maribor itself — home to the world’s oldest productively growing vine, and a very different, quieter city than the capital.

Ljubljana to the Coast: Reaching Koper by Rail

The line toward the Adriatic runs through the Karst plateau, past Postojna and the junction town of Divača, before terminating at Koper, Slovenia’s only sizable port and the terminus of the line built specifically to serve it in the twentieth century. This is the one rail journey on this list worth taking for the scenery alone — the descent through Karst limestone country toward the sea is dramatic in a way the flat Maribor line isn’t.

The catch is that Koper is not where most coastal visitors actually want to end up. Piran, Portorož and Izola — the three towns that draw almost all the coastal tourism — have no railway station of their own. From Koper, the final leg is a local bus, a taxi, or an organized transfer.

If you’d rather not manage that last connection yourself after a two-and-a-half-hour train ride, a pre-booked round-trip transfer from Koper to Piran or Izola, with commentary along the way turns that final stretch into part of the day rather than an errand. Divača, on the same line, is also the junction for Škocjan — again reached from the station by a walk or short taxi, not a direct stop.

Ljubljana to Jesenice: Toward Bled and the Alps

The line running north from Ljubljana through Kranj toward Jesenice and the Austrian border is short — under an hour and a half — and frequent, which makes it tempting to assume it solves the Bled problem. It doesn’t, not entirely. The relevant stop is Lesce-Bled, about 4 km from the lake itself; a local bus or a short taxi covers the gap, and there’s no way to walk it comfortably with luggage. This guide won’t go further into that specific connection — the full picture, including the alternative Bled Jezero station and its more limited service, is covered in how to get to Bled without a car.

Push further up the same line and you reach Jesenice, close to the border with Austria and the practical rail gateway to the Julian Alps. It is not, however, a gateway to Kranjska Gora itself: that town has no station at all, and the last leg from Jesenice is by bus. Travelers set on the mountains without a rental car tend to do better treating the train as the way to reach Ljubljana or Jesenice, then switching entirely to bus or an organized tour for the alpine roads — the Vršič Pass in particular is not something the railway will ever touch.

Crossing Borders by Train

Slovenia’s small size means several of its rail lines simply continue into neighboring countries, and three cross-border routes come up often enough to be worth flagging on their own.

Zagreb, Croatia: this is the most straightforward of the three. A handful of direct trains run daily between Ljubljana and Zagreb, taking a little over two hours, with no change required. It’s a genuinely practical way to combine the two capitals without a car, and worth knowing about even outside a Ljubljana-based trip.

Villach, Austria: north past Jesenice, the line crosses into Austria in the direction of Villach, from where onward connections reach Salzburg, Munich and Vienna. This is more useful as a way into Slovenia from Central Europe than as a day-trip option, but it’s there.

Trieste, Italy: this is the one that trips people up. The domestic line toward the coast has a branch reaching Sežana, right at the Italian border, but there is no straightforward through train running on into Trieste itself. Most travelers doing that particular leg by public transport end up finishing it by bus rather than rail. If Trieste is a fixed point on your route, getting to Ljubljana from Trieste covers the actual options people use in both directions.

Tickets, Classes and Booking

SŽ tickets can be bought at station counters, from ticket machines, or online and through the operator’s app before travel — buying in advance isn’t necessary on most domestic routes the way it is for some Western European high-speed lines, though it removes any uncertainty on busier travel days. On InterCity Slovenija trains, both First and Second Class are available, and the seat reservation that comes with the ticket is effectively mandatory — you’re assigned a specific seat, not just a train. Regional trains, by contrast, are single-class and reservation-free: you buy a ticket, board, and sit wherever there’s room.

Fares on the domestic network are modest by Western European standards, and int the interest of accuracy this guide won’t quote a specific euro figure that could be out of date by the time you travel — check current prices directly through SŽ’s own ticketing channels when you’re ready to book. As a general rule of thumb, a single domestic journey costs a fraction of what a day of car rental plus fuel and the vignette would run, which is the main argument for the train wherever it actually goes where you’re headed.

What the Train Does Not Reach — and What to Do Instead

It’s worth being blunt about this, because it’s the single biggest source of frustration for visitors who plan a Slovenia trip the way they’d plan a trip through Switzerland or Austria’s larger rail networks. The following are simply not on the railway, whatever a zoomed-out map might suggest:

SightNearest stationGap to cover
Lake BledLesce-Bled~4 km — bus or taxi
Postojna CavePostojna~2 km — 20–25 min walk or taxi
Škocjan CavesDivačaShort walk or taxi
Piran / PortorožKoperLocal bus or transfer
Kranjska GoraJeseniceBus, no rail link at all
Vintgar GorgeLesce-Bled areaBus or taxi, no direct station

None of these gaps are difficult to close — Slovenia’s bus network and its density of short organized transfers exist precisely because the railway is this limited — but they do need to be planned rather than assumed.

Travelers building a car-free itinerary around Bled, the Karst caves and the coast in the same trip often find that a short organized tour covers more ground with less friction than stitching together train-plus-bus connections for each leg individually; a day like a guided one-day tour covering Ljubljana’s essential sights is one way to get a full day of sightseeing without managing any connections at all, which is worth weighing against the DIY rail-and-bus approach if your schedule is tight.

For a broader look at when a car (rented or with a driver) simply makes more sense than public transport, see car versus organized tour in Slovenia and renting a car in Slovenia.

A Sample Rail Itinerary

For visitors who want to see how the network actually stitches together, here’s a route that stays entirely on rail lines the whole way, using only towns the train reaches directly:

  1. Ljubljana — arrive, settle in, and spend a day or two on foot around the old town before heading out. A private guided walk through Ljubljana’s old town on day one is a good way to get oriented before the rest of the trip picks up pace.
  2. Ljubljana to Celje (regional or ICS) — a compact stop, good for a half day, back on the main eastern line.
  3. Celje to Maribor — continue east on the same line for Slovenia’s second city and its wine country access.
  4. Maribor to Ptuj (via Pragersko) — the country’s oldest town, easily done as a side trip from Maribor rather than a separate base.
  5. Back to Ljubljana, then on to Koper — the long way round, via Postojna and Divača, finishing on the coastal branch.
  6. Koper onward to Piran by bus or transfer for a couple of coastal days before flying home through Ljubljana Airport.

If your flight home departs from Ljubljana itself and you have a longer layover than expected, an airport lounge pass at Ljubljana Jože Pučnik Airport is a small comfort worth knowing about, separate from the rail question but relevant to the same trip. For how this rail-only route compares against covering the same ground with a car, or against the shorter three- to five-day versions of a Slovenia trip, see how many days in Slovenia, Slovenia in one week and getting around Ljubljana once you’re back in the capital between legs.

Frequently Asked Questions About Train Travel in Slovenia

Does the train go directly to Lake Bled?

No. The closest stop is Lesce-Bled, on the Ljubljana–Jesenice line, roughly 4 km from the lakeshore. From there a local bus or a short taxi ride covers the rest; nothing runs a train into Bled itself.

Can I reach Postojna Cave by train?

You can reach Postojna town by train, but the cave entrance is about 2 km from the station — a 20-25 minute walk, or a quick taxi. The train gets you to Postojna, not to the ticket booth.

How long does the train take from Ljubljana to Maribor?

Around two hours on the fastest InterCity Slovenija (ICS) tilting trains, somewhat longer on regional trains that stop at every town along the way. Both run several times a day.

Do trains run from Ljubljana to the Slovenian coast?

Trains run from Ljubljana to Koper, via Postojna and Divača, in a little under two and a half hours. Piran, Portorož and Izola have no station of their own, so the coast leg finishes with a short bus or transfer from Koper.

Is there a train from Ljubljana to Kranjska Gora or the Julian Alps?

Not directly. Kranjska Gora has no railway station at all; the practical approach by rail is to Jesenice, then a bus for the final stretch into the mountains.

Do I need to reserve a seat on Slovenian trains?

On InterCity Slovenija (ICS) trains, a seat reservation is included in the ticket and effectively required. Regional trains are turn-up-and-go, with no reservation needed or offered.

Is the train cheaper than renting a car in Slovenia?

For the handful of cities the railway actually connects, yes, usually — a single fare is a fraction of a day’s car rental plus fuel and the vignette. Once your plan includes Bled, Postojna, the Alps or the Karst, a car or organized tours start to close the gap fast.

Can I take an international train from Ljubljana to Zagreb, Trieste, or Villach?

Direct trains run to Zagreb, Croatia, in a bit over two hours. Toward Austria, the Jesenice line crosses the border in the direction of Villach. Toward Trieste, the domestic line only reaches the border town of Sežana; most travelers finish that particular leg by bus.

Transfers and transport passes on GetYourGuide

Verified deep-linked GetYourGuide tours. Book through these links and we earn a small commission at no cost to you.

GetYourGuide does not provide a product photo for this activity — the image shows the meeting point, photographed by us.