A heat exchanger comprising: a header to which a gas-refrigerant pipe is connected; and a plurality of heat transfer tubes that are connected to the header, wherein the header includes a first plate member and a second plate member that is stacked on the first plate member in a plate-thickness direction, wherein the first plate member includes a first opening that constitutes an internal space of the header , wherein the second plate member includes a second opening that, together with the first opening , constitutes the internal space of the header , wherein the internal space communicates with the plurality of heat transfer tubes , and wherein the first opening includes a portion whose width in a first direction perpendicular to both the plate-thickness direction and a direction in which the plurality of heat transfer tubes are arranged differs from a width of the second opening in the first direction, wherein the second plate member is disposed at a position that is closer than the first plate member to connection portions where the header and the heat transfer tubes are connected to each other, and wherein the second opening includes a portion whose width in the first direction is larger than the width of the first opening in the first direction, and, wherein the first plate member includes, at a surface on a side at which the second plate member is stacked, a pressure-receiving surface that extends to an inner side of the width of the second opening in the first direction from an outer side of the width of the first opening in the first direction, and that faces the internal space , characterized in that , when viewed in the plate-thickness direction, an overlapping region of the first opening and the second opening overlaps a cross section of each connection portion of two or more of the heat transfer tubes connecting to the header at each connection portion. a header to which a gas-refrigerant pipe is connected; and a plurality of heat transfer tubes that are connected to the header, wherein the header includes a first plate member and a second plate member that is stacked on the first plate member in a plate-thickness direction, wherein the first plate member includes a first opening that constitutes an internal space of the header , wherein the second plate member includes a second opening that, together with the first opening , constitutes the internal space of the header , wherein the internal space communicates with the plurality of heat transfer tubes , and wherein the first opening includes a portion whose width in a first direction perpendicular to both the plate-thickness direction and a direction in which the plurality of heat transfer tubes are arranged differs from a width of the second opening in the first direction, wherein the second plate member is disposed at a position that is closer than the first plate member to connection portions where the header and the heat transfer tubes are connected to each other, and wherein the second opening includes a portion whose width in the first direction is larger than the width of the first opening in the first direction, and, wherein the first plate member includes, at a surface on a side at which the second plate member is stacked, a pressure-receiving surface that extends to an inner side of the width of the second opening in the first direction from an outer side of the width of the first opening in the first direction, and that faces the internal space , characterized in that , when viewed in the plate-thickness direction, an overlapping region of the first opening and the second opening overlaps a cross section of each connection portion of two or more of the heat transfer tubes connecting to the header at each connection portion. <EOS>