Mataró is connected to Barcelona by the Cercanías R1 commuter line, which runs frequently throughout the day and takes around 35–40 minutes to Barcelona Sants or Passeig de Gràcia. The journey makes Mataró an easy day trip from the city, or a cheaper base for exploring the Costa del Maresme. The train station is a ten-minute walk from the old town and the seafront.
Spain's first-ever railway line ran between Barcelona and Mataró, opening on 28 October 1848. That original terminus is long gone, but the connection has remained continuous ever since — Mataró holds a quiet pride in having been the destination of that first journey.
By car, the C-32 motorway (toll) or the N-II coastal road connect Mataró to Barcelona. The drive takes around 30–45 minutes depending on traffic. Parking near the seafront is easier and cheaper than anything in Barcelona.
There is no commercial airport in Mataró. The nearest airports are Barcelona–El Prat (about 45 km by road) and Girona–Costa Brava (about 65 km). Both are well served by buses and trains into the regional network.