A magnetic sensor device includes a magnetic field converter that receives an input magnetic field input along a first direction and outputs an output magnetic field along a second direction, which is orthogonal to the first direction. A magnetic field detector is provided at a position where the output magnetic field can be applied. A magnetic shield that blocks an external magnetic field along the second direction, is provided. The magnetic field converter has a shape in which the length in a third direction, which is orthogonal to both the first direction and the second direction, is longer than the length in the second direction, when viewed along the first direction. The magnetic shield is provided at a position overlapping with the magnetic field converter and the magnetic field detector, when viewed along the first direction.