Hungary borders seven countries: Slovakia, Ukraine, Romania, Serbia, Croatia, Slovenia, and Austria, with a combined land frontier of about 2,106 km. A landlocked nation in the Carpathian Basin of Central Europe, Hungary touches more neighbors than almost any country of its size, a direct consequence of its central position where Western Europe, the Balkans, and the former Soviet sphere meet.
The Seven Neighbors at a Glance
Hungary's borders fan out in nearly every direction, each one carrying a distinct history and landscape. Listed roughly from the longest frontier to the shortest, the seven neighbors are:
- Slovakia to the north (about 627 km) — Hungary's longest border
- Romania to the east and southeast (about 424 km)
- Croatia to the southwest (about 329 km)
- Austria to the west (about 321 km)
- Serbia to the south (about 164 km)
- Ukraine to the northeast (about 128 km)
- Slovenia to the west (about 102 km) — Hungary's shortest border
Four of these countries — Slovakia, Austria, Croatia, and Slovenia — are fellow members of the European Union and the Schengen Area, so crossing those borders today involves no passport checks. Romania joined Schengen's land borders more recently, while Serbia and Ukraine remain outside the bloc, making their crossings the EU's external frontier.
The Northern and Eastern Borders
Hungary's frontier with Slovakia is its most significant, stretching roughly 627 km and following the Danube for a long stretch. The river separates the two capitals, Budapest and Bratislava, which sit only about 55 km apart — among the closest pairs of capital cities anywhere in Europe. A large Hungarian-speaking community lives in southern Slovakia, a legacy of the centuries when the region belonged to the Kingdom of Hungary.
Further east, Ukraine shares Hungary's shortest land border at around 128 km. The neighboring Transcarpathian region was once Hungarian territory and still has a notable Hungarian minority, and the Záhony–Chop crossing remains a key gateway for trade between the EU and Ukraine. Romania, by contrast, shares a long 424 km border to the east. Transylvania belonged to Hungary for much of its history, and roughly 1.2 million ethnic Hungarians — the largest such minority anywhere — still live across the line, linking twin border cities like Debrecen and Oradea.
The Southern Balkan Frontier
To the south, Hungary meets two countries that were once part of Yugoslavia. Serbia shares about 164 km of mostly flat, agricultural border across the Pannonian Plain. The Vojvodina region just over the line is home to roughly a quarter of a million ethnic Hungarians, and the city of Subotica maintains close cultural and economic ties with Hungary. This crossing is also one of the EU's external borders and has been a focus of migration management in recent years.
Croatia shares about 329 km to the southwest, much of it marked by the Drava River. The bond between the two nations runs deep: from 1102 to 1918 they were joined in a personal union under the Croatian–Hungarian crown. The Baranja region straddling the modern border is celebrated for its vineyards and shared cultural heritage.
The Western Borders with Austria and Slovenia
Austria lies to the west along roughly 321 km of border that includes Lake Neusiedl (Lake Fertő), a shared UNESCO World Heritage Site and the largest steppe lake in Central Europe. The frontier here carries enormous symbolic weight: near Sopron in 1989, the Pan-European Picnic temporarily opened the border and became one of the first cracks in the Iron Curtain that divided Europe.
The shortest border, about 102 km, is with Slovenia, through a region of rolling hills and vineyards. The Slovenian Prekmurje area and Hungary's Őrség district share dialects and folk traditions that predate the modern boundary. To explore more about the country itself, see our hungary country guide.
How History Drew These Lines
Hungary's seven borders are best understood through the Treaty of Trianon of 1920, which dissolved the Austro-Hungarian Empire after World War I. The treaty reduced the historic Kingdom of Hungary to roughly a third of its former territory and split off lands that became parts of Czechoslovakia, Romania, and Yugoslavia. This is why large Hungarian-speaking populations still live just beyond every land border — in Slovakia, Ukraine, Romania, and Serbia especially. The Danube ties the country to several of its neighbors, flowing south through Hungary after forming part of the Slovak boundary, making the river both a natural border and a shared lifeline.
Frequently Asked Questions
How many countries border Hungary?
Hungary borders seven countries: Slovakia, Ukraine, Romania, Serbia, Croatia, Slovenia, and Austria. Together these land frontiers total about 2,106 km.
Which country has the longest border with Hungary?
Slovakia shares Hungary's longest border at roughly 627 km, much of it running along the Danube River between Budapest and Bratislava.
Which is Hungary's shortest border?
Slovenia shares Hungary's shortest border at about 102 km, narrowly shorter than the 128 km frontier with Ukraine.
Does Hungary have a coastline?
No. Hungary is landlocked, with no access to the sea. Its closest maritime neighbor, Croatia, provides Hungary's nearest route to the Adriatic coast.
