A shift device includes a housing, a shift lever, a sensor unit. The shift lever is moved forward and rearward, and leftward and rightward of the shift device for selecting the connection state of the transmission of a vehicle. The sensor unit is attached to the housing. The sensor unit includes a first MRE element, a second MRE element, a light sensor, a first microswitch, and a second microswitch, which are integrated. The first MRE element, the second MRE element, and the light sensor detect the position of the shift lever in the front-rear direction. The first and second microswitches detect the position of the shift lever in the left-right direction.