Spain is high-speed rail heaven, with rapid routes out of the capital radiating to the country’s other great cities. Along key lines, there’s a fast-expanding choice of trains which, while all thundering along at roughly the same speed, offer varying levels of price, choice of seating class and onboard service. Arguably the flagship of the network is the service from Madrid to Barcelona – the first and most obvious starting point in the country’s efforts to get travelers off planes and onto the rails. In what was once Europe’s busiest air corridor, today this service handles three-quarters of all journeys between the two cities. Here's what to expect on the Madrid to Barcelona train route.

Start: Madrid Atocha
Finish: Barcelona Sants 
Distance: 506km (314 miles) 
Duration: 2 hours and 39 minutes (direct) 
Ticket types: AVE trains have three types of fare: Básico, Elige and Prémium. Básico is the cheapest and least flexible Standard Class option. Elige tickets, offering greater flexibility, can be bought for Standard or Comfort Class, the latter being a premium seat. Prémium fares give you a Comfort seat and the widest range of options when rebooking. 
How to book: Check Trainline to explore all available options per route. 

Passengers on moving walkways heading down into a station.
The interior of a train refreshments carriage with a counter for service and small tables for standing at.
Left: Passengers make their way to trains at Madrid Atocha. Right: A cafe car on an AVE train at Madrid Atocha. Emilio Parra Doiztua for Lonely Planet (2)

Departure

Starting my own journey one morning in Madrid, I wasn’t sure if it was early or still late as I checked out of my hotel. Madrid is a city that stays out till the wee hours, and plenty of revelers were strolling down the streets as dawn broke. Disconcertingly for this middle-aged Northern European, many were older than me: Spanish pensioners heading home from all-nighters mingled with groups of younger madrileños, both parties still going strong. As I drew closer to Atocha Station, I enjoyed swapping pleasantries with some of these stragglers as the ambience slowly changed from one-more-beer naughtiness to coffee and, for me, the start of a wonderful journey.

Arriving on foot, my first view of what is more formally known as Estación de Madrid Atocha was the curvaceous girders of its original 1892 trainshed, now somewhat sunk below a mesh of modern highways. Upon entering the station by what felt like a side door, I descended onto the old platform level. For Atocha’s centenary, this vast indoor area was reimagined as a tropical garden, with palm trees and looming greenery interspersed with good-looking eating and drinking options to continue last night’s fun. Beams of sunlight shot here and there, casting spotlights on commuters arriving for a day’s work. 

Departure formalities before boarding Spanish high-speed trains require a little extra time than you might be used to. These involve passing through slimmed-down airport-style security, then hanging out in a departure hall above the station’s modern platforms before joining – what was for me – a lengthy line for a ticket check. Sense of wonder about this journey returned quickly when I got to the platform level and saw my unquestionably handsome Renfe AVE (Alta Velocidad Española) fast train. In fact, I saw several at the same time. 

The fleet waiting to depart was as impressive as the tropical atrium on the other side: a sleek-looking assortment of trains, united in their capacity to travel at speeds of up to 300km/h (186mph). 

People wander down a pedestrianized street in a city near a large domed cathedral.
Zaragoza city center, a popular stop on this train route. AlexeMarcel/Shutterstock

The journey

Express trains make the Madrid–Barcelona trip in about two hours and 30 minutes, but taking a stopping service can pay dividends, despite the slower journey time (an extra 20–45 minutes). Direct trains generally cost more, being the fastest, and while breaking up a high-speed journey might seem anathema if your priority is racing the plane, there is some logic to stop-offs in places like Zaragoza, especially if there’s time for an overnight stay. What was once the Roman city of Caesaraugusta is now one of Spain’s gastronomic capitals, with an old town bursting with bars and cafes. You can also detour up the single-track line to Canfranc in the Pyrenees, home to a station that was a white elephant for decades, now reborn as a high-end hotel on a railway to nowhere. 

My journey, however, was all about speed, so a Zaragoza stopover was for another time. I’d booked onto Renfe’s AVE direct service in Standard Class, which meant I didn’t qualify for the in-seat food and drink service, but I still got a large window seat and, as no one turned up to sit next to me, plenty of room to spread out. Departing Atocha, the first sight was a vast train yard where many of the workhorses of this route come to rest at night. Leaving the city behind, the scrubby hinterland gave way to a mix of undulating terrain and broad plains dotted with towns and villages basking in the sunshine. 

Cable cars in a hilly city.
Left: Cable cars to Castell de Montjuïc in Barcelona. martin SC photo/Shutterstock Right: Barceloneta Beach. peresanz/Shutterstock
A crowded palm tree-lined city beach on a sunny day.

By the time we had passed briefly through Camp de Tarragona, the deep blue of the Mediterranean Sea appeared between hills, heralding our arrival at the seaside and Barcelona. Though I was thrilled to be rolling in on time to one of the world’s most beautiful cities, Barcelona’s Sants terminus made for an unromantic arrival point, with platforms buried deep beneath street level. I followed the crowds up the escalators and out of the modern concourse into the sunshine of the Catalan morning. Visitors need to continue on by metro or suburban train to find the Barcelona of their dreams, whether that’s taking in the city views from Montjuïc hill, strolling the Barri Gòtic or heading to the port for an onward ferry to the Balearic Islands. 

If Madrid to Barcelona is too short to be an epic train ride in itself, this need not be journey’s end. The tracks rumble beneath the city from here, pretty much right under La Sagrada Família, and then the high-speed line thunders to Figueres and the French border at Perpignan. AVEs travel deep into France to Marseille and Lyon, and if Trenitalia’s expansive plans to link Madrid with Paris come to fruition, direct services may soon link the Spanish and French capitals for the first time since the demise of the night train in 2013. Whatever the future may hold, Madrid to Barcelona is an essential cog in the great European rail machine.

An empty window seat on a train passing fields bathed in sunlight at high speed.
An Iryo train from Madrid to Barcelona. Emily Simms for Lonely Planet

Things to know

As well as Renfe’s AVE and low-cost AVLO services, Spain has high-speed services run by Ouigo (owned by France’s SNCF) and Iryo (part-owned by Italy’s Trenitalia). All have different seats, classes and catering options. You need to take a low-cost (but still high-speed) AVLO train between Madrid and Barcelona to ride the distinctive Renfe S102 and 112 models, nicknamed pato (duck) for their bill-shaped cars.

Because of the pre-boarding procedures for Spanish high-speed trains, allow 30 minutes (or longer) to comfortably get through security and ticket checks, and to find your carriage.

This is an extract from Lonely Planet's new book Epic Train Trips of the World, published in September 2025.

Explore related stories