A magnetic sensor comprises a substrate, magnetoresistive element of a
spin-valve type, a bias magnetic layer (or a permanent magnet film), and
a protective film, wherein the bias magnetic layer is connected with both
ends of the magnetoresistive element and the upper surface thereof is
entirely covered with the lower surface of the magnetoresistive element
at both ends. Herein, distances between the side surfaces of the both
ends of the magnetoresistive element and the side surfaces of the bias
magnetic layer viewed from the protective film do not exceed 3 .mu.m. In
addition, a part of the bias magnetic layer can be covered with both ends
of the magnetoresistive element, and an intermediate layer is arranged in
relation to the magnetoresistive element, bias magnetic layer, and
protective film so as to entirely cover the upper surface of the bias
magnetic layer.