A heat exchanger comprising: a plurality of flat tubes; a first header collecting pipe connected to one ends of the flat tubes; a second header collecting pipe connected to the other ends of the flat tubes; and wherein the heat exchanger is configured to exchange heat between fluid flowing through each flat tube and air flowing outside the each flat tube, and is capable of functioning as an evaporator, the first header collecting pipe and the second header collecting pipe are in a standing attitude, and the first header collecting pipe is formed with a connection port connected to a pipe through which refrigerant flows, a mixing chamber communicating with the connection port and configured to mix liquid refrigerant and gas refrigerant of gas-liquid refrigerant flowing into the mixing chamber through the connection port to homogenize the gas-liquid refrigerant, a plurality of communication chambers (62a-62c) arranged in a vertical direction and each communicating with one or more of the flat tubes, a plurality of distribution paths configured to distribute the homogenized refrigerant of the mixing chamber to the communication chambers (62a-62c), the first header collecting pipe includes a vertical partition provided along an axial direction of the first header collecting pipe and configured to separate at least one of the communication chambers (62a-62c) from the mixing chamber, and a horizontal partition (80, 85) provided so as to intersect the axial direction of the first header collecting pipe and configured to separate the communication chambers (62a-62c) adjacent to each other in the vertical direction from each other, the communication chambers (62a-62c) of the first header collecting pipe include three or more communication chambers, the horizontal partition (80, 85) include an upper horizontal partition configured to separate an uppermost one of the communication chambers (62a-62c) from an adjacent one of the communication chambers (62a-62c), and a lower horizontal partition configured to separate a lowermost one of the communication chambers (62a-62c) from an adjacent one of the communication chambers (62a-62c), the vertical partition is configured to separate the mixing chamber from one or more of the communication chambers (62a-62c) positioned between the upper horizontal partition and the lower horizontal partition, characterised in that the mixing chamber is surrounded by the vertical partition, the upper horizontal partition, the lower horizontal partition, and a side wall of the first header collecting pipe, and a plurality of fins are joined to the flat tubes a plurality of flat tubes; a first header collecting pipe connected to one ends of the flat tubes; a second header collecting pipe connected to the other ends of the flat tubes; and a connection port connected to a pipe through which refrigerant flows, a mixing chamber communicating with the connection port and configured to mix liquid refrigerant and gas refrigerant of gas-liquid refrigerant flowing into the mixing chamber through the connection port to homogenize the gas-liquid refrigerant, a plurality of communication chambers (62a-62c) arranged in a vertical direction and each communicating with one or more of the flat tubes, a plurality of distribution paths configured to distribute the homogenized refrigerant of the mixing chamber to the communication chambers (62a-62c), a vertical partition provided along an axial direction of the first header collecting pipe and configured to separate at least one of the communication chambers (62a-62c) from the mixing chamber, and a horizontal partition (80, 85) provided so as to intersect the axial direction of the first header collecting pipe and configured to separate the communication chambers (62a-62c) adjacent to each other in the vertical direction from each other, an upper horizontal partition configured to separate an uppermost one of the communication chambers (62a-62c) from an adjacent one of the communication chambers (62a-62c), and a lower horizontal partition configured to separate a lowermost one of the communication chambers (62a-62c) from an adjacent one of the communication chambers (62a-62c),