A heat exchanger comprising: a plurality of flat tubes each forming a refrigerant flow path; a pair of header pipes (4a, 4b) connected to respective end parts (2a, 2b) of each flat tube; a first refrigerant pipe which is connected to a first header pipe of the pair of header pipes (4a, 4b) and from which a refrigerant flows to an outside of the heat exchanger in a case where the heat exchanger functions as an evaporator; and a plurality of second refrigerant pipes (6a, 6b) which are connected to the first header pipe and into which the refrigerant flows from the outside of the heat exchanger in a case where the heat exchanger functions as an evaporator, a partition wall separating a space to which the first refrigerant pipe is connected and a space to which the plurality of second refrigerant pipes (6a, 6b) are connected; an upper-side partition plate separating an inside of the space to which the plurality of second refrigerant pipes (6a, 6b) are connected into a first refrigerant inflow space to which one of the second refrigerant pipes (6a, 6b) at an upper portion is connected and a refrigerant outflow space to which the plurality of flat tubes are connected; and a lower-side partition plate separating the inside of the space to which the plurality of second refrigerant pipes (6a, 6b) are connected into a second refrigerant inflow space to which another one of the second refrigerant pipes (6a, 6b) at a lower portion is connected and the refrigerant outflow space to which the plurality of flat tubes are connected, characterized in that the upper-side partition plate and the lower-side partition plate are provided with communication holes (12a, 12b). a plurality of flat tubes each forming a refrigerant flow path; a pair of header pipes (4a, 4b) connected to respective end parts (2a, 2b) of each flat tube; a first refrigerant pipe which is connected to a first header pipe of the pair of header pipes (4a, 4b) and from which a refrigerant flows to an outside of the heat exchanger in a case where the heat exchanger functions as an evaporator; and a plurality of second refrigerant pipes (6a, 6b) which are connected to the first header pipe and into which the refrigerant flows from the outside of the heat exchanger in a case where the heat exchanger functions as an evaporator, a partition wall separating a space to which the first refrigerant pipe is connected and a space to which the plurality of second refrigerant pipes (6a, 6b) are connected; an upper-side partition plate separating an inside of the space to which the plurality of second refrigerant pipes (6a, 6b) are connected into a first refrigerant inflow space to which one of the second refrigerant pipes (6a, 6b) at an upper portion is connected and a refrigerant outflow space to which the plurality of flat tubes are connected; and a lower-side partition plate separating the inside of the space to which the plurality of second refrigerant pipes (6a, 6b) are connected into a second refrigerant inflow space to which another one of the second refrigerant pipes (6a, 6b) at a lower portion is connected and the refrigerant outflow space to which the plurality of flat tubes are connected, characterized in that the upper-side partition plate and the lower-side partition plate are provided with communication holes (12a, 12b).