A heat exchanger, comprising: a plurality of flat tubes arranged mutually side by side; a header part extending upward so as to follow the direction in which the plurality of flat tubes are arranged side by side, the interior of the header part being partitioned into a first space to which one end of each of the plurality of flat tubes is connected and a second space to which the plurality of flat tubes are not connected; and a guide part having a guide space positioned below the first space, the guide space communicating with the first space via an ascending opening (82a, 82b); the first space and the second space communicating with each other via an upper communication port provided within the upper side of the header part and a lower communication port provided within the lower side of the header part; characterized in that: when the heat exchanger is viewed from above after having been installed, the plurality of flat tubes and the ascending opening (82a, 82b) have an area of overlap; and when the heat exchanger is viewed from above after having been installed, the ascending opening (82a, 82b) and the space where the lower communication port is extended along the direction in which the flat tubes extend do not overlap, or the ascending opening (82a, 82b) and the space where the lower communication port is extended along the direction in which the flat tubes extend have an area of overlap that is up to 50% of the ascending opening (82a, 82b). a plurality of flat tubes arranged mutually side by side; a header part extending upward so as to follow the direction in which the plurality of flat tubes are arranged side by side, the interior of the header part being partitioned into a first space to which one end of each of the plurality of flat tubes is connected and a second space to which the plurality of flat tubes are not connected; and a guide part having a guide space positioned below the first space, the guide space communicating with the first space via an ascending opening (82a, 82b); the first space and the second space communicating with each other via an upper communication port provided within the upper side of the header part and a lower communication port provided within the lower side of the header part; characterized in that: when the heat exchanger is viewed from above after having been installed, the plurality of flat tubes and the ascending opening (82a, 82b) have an area of overlap; and when the heat exchanger is viewed from above after having been installed, the ascending opening (82a, 82b) and the space where the lower communication port is extended along the direction in which the flat tubes extend do not overlap, or the ascending opening (82a, 82b) and the space where the lower communication port is extended along the direction in which the flat tubes extend have an area of overlap that is up to 50% of the ascending opening (82a, 82b). when the heat exchanger is viewed from above after having been installed, the plurality of flat tubes and the ascending opening (82a, 82b) have an area of overlap; and when the heat exchanger is viewed from above after having been installed, the ascending opening (82a, 82b) and the space where the lower communication port is extended along the direction in which the flat tubes extend do not overlap, or the ascending opening (82a, 82b) and the space where the lower communication port is extended along the direction in which the flat tubes extend have an area of overlap that is up to 50% of the ascending opening (82a, 82b).