Hungarian Slovenes (Slovene: Madžarski Slovenci, Hungarian: Magyarországi szlovének) are an autochthonous ethnic and linguistic Slovene minority living in Hungary. The largest groups are the Rába Slovenes (Slovene: porabski Slovenci, dialectically: vogrski Slovenci, bákerski Slovenci, porábski Slovenci) in the Rába Valley in western Hungary between the town of Szentgotthárd and the borders with Slovenia and Austria. They speak the Prekmurje Slovene dialect. Outside the Rába Valley, Slovenes mainly live in the Szombathely region and in Budapest.
The ancestors of modern Slovenes have lived in the western part of the Carpathian basin since at least the 6th century AD; their presence thus dates back to before the Magyars came into the region. They formed the Slavic Balaton Principality and were later incorporated in Arnulf's Kingdom of Carantania which extended to most of modern south-eastern Austria, southern Hungary and northern Croatia. After the Hungarian invasion in the late 9th century, most of the local Slavs were magyarized. Between the 11th and 12th century, the current linguistic and ethnic border between the Hungarian and Slovene people was established.