A magnetic sensor comprising: a plurality of element portions each of which is formed by laminating a magnetic layer and a non-magnetic layer and has a magneto-resistive effect; bias layers that are provided on both sides of each element portion in a first horizontal direction (X1-X2); and soft magnetic bodies that are provided on both sides of each element portion in a second horizontal direction (Y1-Y2) orthogonal to the first horizontal direction (X1-X2) so as not to contact each element portion and each bias layer, wherein a sensitivity axis direction of each element portion is the second horizontal direction (Y1-Y2), a magnetization direction of each bias layer is the second horizontal direction (Y1-Y2), each bias layer is configured such that a bias magnetic field is supplied in the first horizontal direction (X1-X2) from each bias layer to each element portion, the plurality of element portions are arranged in the first horizontal direction (X1-X2) with a gap therebetween and the bias layers connected to the element portions which are adjacent to each other in the first horizontal direction (X1-X2) are connected to each other by a conductive layer, thereby forming an element-connected body, a plurality of the element-connected bodies are arranged in the second horizontal direction (Y1-Y2) with a gap therebetween and end portions of the element-connected bodies are connected to each other in a meander shape by a conductive layer, the bias layer does not overlap a virtual line which connects edge portions where the distance between the soft magnetic bodies is the shortest in a straight line in a plan view and the virtual line passes through the element portion disposed between the bias layers, and the bias layer is not provided between the soft magnetic bodies of the element-connected bodies which are adjacent to each other in the second horizontal direction (Y1-Y2), characterized in that each soft magnetic body is configured such that, when an external magnetic field is applied in the first horizontal direction (X1-X2), the soft magnetic bodies which are provided on both sides of each element portion in the second horizontal direction (Y1-Y2) convert the external magnetic field in a horizontal direction different from the first horizontal direction (X1-X2) and supply the external magnetic field to the element portion, and a predetermined gap is provided between each element portion and each of the soft magnetic bodies which are provided on both sides of each element portion in the second horizontal direction (Y1-Y2) in a plan view. a plurality of element portions each of which is formed by laminating a magnetic layer and a non-magnetic layer and has a magneto-resistive effect; bias layers that are provided on both sides of each element portion in a first horizontal direction (X1-X2); and soft magnetic bodies that are provided on both sides of each element portion in a second horizontal direction (Y1-Y2) orthogonal to the first horizontal direction (X1-X2) so as not to contact each element portion and each bias layer, wherein a sensitivity axis direction of each element portion is the second horizontal direction (Y1-Y2), a magnetization direction of each bias layer is the second horizontal direction (Y1-Y2), each bias layer is configured such that a bias magnetic field is supplied in the first horizontal direction (X1-X2) from each bias layer to each element portion, the plurality of element portions are arranged in the first horizontal direction (X1-X2) with a gap therebetween and the bias layers connected to the element portions which are adjacent to each other in the first horizontal direction (X1-X2) are connected to each other by a conductive layer, thereby forming an element-connected body, a plurality of the element-connected bodies are arranged in the second horizontal direction (Y1-Y2) with a gap therebetween and end portions of the element-connected bodies are connected to each other in a meander shape by a conductive layer, the bias layer does not overlap a virtual line which connects edge portions where the distance between the soft magnetic bodies is the shortest in a straight line in a plan view and the virtual line passes through the element portion disposed between the bias layers, and the bias layer is not provided between the soft magnetic bodies of the element-connected bodies which are adjacent to each other in the second horizontal direction (Y1-Y2), characterized in that each soft magnetic body is configured such that, when an external magnetic field is applied in the first horizontal direction (X1-X2), the soft magnetic bodies which are provided on both sides of each element portion in the second horizontal direction (Y1-Y2) convert the external magnetic field in a horizontal direction different from the first horizontal direction (X1-X2) and supply the external magnetic field to the element portion, and a predetermined gap is provided between each element portion and each of the soft magnetic bodies which are provided on both sides of each element portion in the second horizontal direction (Y1-Y2) in a plan view.