The city is located in the valley between the Gerecse and Vértes Mountains, some from the capital. By virtue of its location, the city is a railway and road junction. The M1 (also European routes E60, E75) motorway from Vienna to Budapest passes through the outer city limits, and the Vienna-Budapest railway line also passes through the city.