A heat exchanger (11, 11a) comprising: a header (30, 40, 80, 82, 130, 230) that forms a refrigerant flow path, wherein the header includes a first member (31, 41) that includes a first plate-shaped portion (31a, 41a), a second member (37, 46) that includes a second plate-shaped portion (37a, 46a), and a third member (34, 45, 136) that includes a third plate-shaped portion (34a, 45a, 136a) positioned between the first plate-shaped portion and the second plate-shaped portion in a first direction that is a direction in which the first plate-shaped portion and the second plate-shaped portion are arranged, wherein a plurality of heat transfer tubes are connected to the first plate-shaped portion (31a, 41a), wherein the third plate-shaped portion has a first opening (34o, 45x, 136o, 145x) that constitutes a part of the refrigerant flow path, the first opening being extending in a second direction that is a direction in which the plurality of heat transfer tubes are arranged, wherein the first opening includes a first region (34x, 51, 136x, 151) and a second region (34y, 52, 136y, 152), and a third region (34z, 53, 136z, 153) that are arranged in this order in the second direction, and wherein, when a direction that is perpendicular to both of the first direction and the second direction is a third direction, a length of the second region (34y, 52, 136y, 152) in the third direction is shorter than a length of the first region (34x, 51, 136x, 151) in the third direction and is shorter than a length of the third region (34z, 53, 136z, 153) in the third direction, wherein, the heat exchanger further comprises a fourth member (36, 134) that includes a fourth plate-shaped portion (36a, 134a) positioned between the first plate-shaped portion and the second plate-shaped portion in the first direction, and having a second opening (36y, 134x) that constitutes a part of the refrigerant flow path, a longitudinal direction of the second opening is the second direction and a fifth member (35, 135) that includes a fifth plate-shaped portion (35a, 135a) positioned between the third plate-shaped portion and the fourth plate-shaped portion in the first direction, characterized in that the fifth plate-shaped portion has a third opening (35z, 135y) that communicates with the third region and the second opening, and a fourth opening (35y, 135x) that, at a position differing from a position of the third opening in the second direction, communicates with the third region and the second opening. a header (30, 40, 80, 82, 130, 230) that forms a refrigerant flow path, wherein the header includes a first member (31, 41) that includes a first plate-shaped portion (31a, 41a), a second member (37, 46) that includes a second plate-shaped portion (37a, 46a), and a third member (34, 45, 136) that includes a third plate-shaped portion (34a, 45a, 136a) positioned between the first plate-shaped portion and the second plate-shaped portion in a first direction that is a direction in which the first plate-shaped portion and the second plate-shaped portion are arranged, wherein a plurality of heat transfer tubes are connected to the first plate-shaped portion (31a, 41a), wherein the third plate-shaped portion has a first opening (34o, 45x, 136o, 145x) that constitutes a part of the refrigerant flow path, the first opening being extending in a second direction that is a direction in which the plurality of heat transfer tubes are arranged, wherein the first opening includes a first region (34x, 51, 136x, 151) and a second region (34y, 52, 136y, 152), and a third region (34z, 53, 136z, 153) that are arranged in this order in the second direction, and wherein, when a direction that is perpendicular to both of the first direction and the second direction is a third direction, a length of the second region (34y, 52, 136y, 152) in the third direction is shorter than a length of the first region (34x, 51, 136x, 151) in the third direction and is shorter than a length of the third region (34z, 53, 136z, 153) in the third direction, wherein, the heat exchanger further comprises a fourth member (36, 134) that includes a fourth plate-shaped portion (36a, 134a) positioned between the first plate-shaped portion and the second plate-shaped portion in the first direction, and having a second opening (36y, 134x) that constitutes a part of the refrigerant flow path, a longitudinal direction of the second opening is the second direction and a fifth member (35, 135) that includes a fifth plate-shaped portion (35a, 135a) positioned between the third plate-shaped portion and the fourth plate-shaped portion in the first direction, characterized in that the fifth plate-shaped portion has a third opening (35z, 135y) that communicates with the third region and the second opening, and a fourth opening (35y, 135x) that, at a position differing from a position of the third opening in the second direction, communicates with the third region and the second opening.