A heat exchanger comprising: a plurality of flat tubes extending in a first direction and arranged with spacing from each other in a second direction perpendicular to the first direction, a cross-section of each of the plurality of flat tubes in the second direction being an elongated shape; and a header extending in the second direction and connecting to end portions of the adjacent flat tubes of the plurality of flat tubes in the first direction, the header having inside a flow passage through which refrigerant flows, the flow passage including a plurality of partition portions each provided between the adjacent flat tubes and configured to block at least a part of the flow passage between the adjacent flat tubes to prevent the refrigerant from flowing in the second direction, a plurality of insertion portions formed between the adjacent partition portions, each of the plurality of insertion portions forming a space where the refrigerant flows in a third direction perpendicular to the first direction and the second direction, each of the plurality of flat tubes being inserted in to each of the plurality of insertion portions, a first communication passage allowing one ends of the adjacent insertion portions in the third direction to communicate with each other, and a second communication passage allowing an other ends of the adjacent insertion portions in the third direction to communicate with each other, characterised in that a cross-sectional area of the first communication passage, of a cross-section perpendicular to the second direction, being larger than a cross-sectional area of the second communication passage, of a cross-section perpendicular to the second direction, the first communication passage being provided with a first refrigerant inlet connected to the flow passage and allowing the refrigerant to flow into the header. a plurality of flat tubes extending in a first direction and arranged with spacing from each other in a second direction perpendicular to the first direction, a cross-section of each of the plurality of flat tubes in the second direction being an elongated shape; and a header extending in the second direction and connecting to end portions of the adjacent flat tubes of the plurality of flat tubes in the first direction, the header having inside a flow passage through which refrigerant flows, the flow passage including a plurality of partition portions each provided between the adjacent flat tubes and configured to block at least a part of the flow passage between the adjacent flat tubes to prevent the refrigerant from flowing in the second direction, a plurality of insertion portions formed between the adjacent partition portions, each of the plurality of insertion portions forming a space where the refrigerant flows in a third direction perpendicular to the first direction and the second direction, each of the plurality of flat tubes being inserted in to each of the plurality of insertion portions, a first communication passage allowing one ends of the adjacent insertion portions in the third direction to communicate with each other, and a second communication passage allowing an other ends of the adjacent insertion portions in the third direction to communicate with each other, characterised in that a cross-sectional area of the first communication passage, of a cross-section perpendicular to the second direction, being larger than a cross-sectional area of the second communication passage, of a cross-section perpendicular to the second direction, the first communication passage being provided with a first refrigerant inlet connected to the flow passage and allowing the refrigerant to flow into the header.