According to an embodiment, a pressure sensor includes a support part, a flexible membrane part, and a magnetoresistive element. The flexible membrane part is supported by the support part, and includes a first region and a second region with rigidity lower than rigidity of the first region. The magnetoresistive element is provided on the membrane part, and includes a first magnetic layer, a second magnetic layer, and a spacer layer provided between the first magnetic layer and the second magnetic layer.根據一實施方式,一種壓力感測器,包含:支撐部,撓性膜部,和磁阻元件。撓性膜部藉由該支撐部支撐,和包括第一區域和具有比第一區域的剛性低的剛性的第二區域。磁阻元件設置在該膜部上,和包括第一磁性層,第二磁性層,和在該第一磁性層和該第二磁性層之間設置的間隔層。11‧‧‧樹脂基板20‧‧‧MEMS晶片21‧‧‧支撐部22‧‧‧隔膜22A‧‧‧第一區域22B‧‧‧第二區域23‧‧‧磁阻元件