A pressure sensor according to an embodiment includes: a support member a membrane supported by the support and having flexibility and a strain detection element formed on the membrane. The strain detection element includes a first magnetic layer formed on the membrane and having a magnetization, a second magnetic layer having a magnetization, and an intermediate layer formed between the first magnetic layer and the second magnetic layer. A direction of at least one of the magnetization of the first magnetic layer and the magnetization of the second magnetic layer changes relatively to that of the other depending on a strain of the membrane. Moreover, the membrane includes an oxide layer that includes aluminum.