A heat exchanger for heat exchange between heat medium flowing inside the heat exchanger and air flowing outside the heat exchanger, the heat exchanger comprising a first heat-exchange portion and a second heat-exchange portion that are arranged facing each other in an air flow direction, and are connected to allow the heat medium to flow between the first heat-exchange portion and the second heat-exchange portion, wherein the first heat-exchange portion includes a first core having a stacked structure of tubes through which the heat medium flows, and a first header tank connected to ends of the tubes of the first core and having an inflow portion through which the heat medium flows into the first heat-exchange portion, the second heat-exchange portion includes a second core having a stacked structure of tubes through which the heat medium flows, and a second header tank connected to ends of the tubes of the second core and having an outflow portion through which the heat medium flows out of the second heat-exchange portion, the first header tank allows a gas-phase heat medium to flow through the first header tank, the second header tank allows a liquid-phase heat medium to flow through the second header tank, the liquid-phase heat medium is lower in temperature than the gas-phase heat medium flowing through the first header tank, the first header tank and the second header tank are connected to each other via a connecting portion, the connecting portion has a slit passing through the connecting portion, a tank longitudinal direction is defined as a direction parallel to both a central axis of the first header tank and a central axis of the second header tank, and the slit is one of slits arranged side by side in the connecting portion at a predetermined slit interval in the tank longitudinal direction, characterized in that a length of each of the slits in the tank longitudinal direction is longer than a length of the slit interval in the tank longitudinal direction. a first heat-exchange portion and a second heat-exchange portion that are arranged facing each other in an air flow direction, and are connected to allow the heat medium to flow between the first heat-exchange portion and the second heat-exchange portion, wherein the first heat-exchange portion includes a first core having a stacked structure of tubes through which the heat medium flows, and a first header tank connected to ends of the tubes of the first core and having an inflow portion through which the heat medium flows into the first heat-exchange portion, the second heat-exchange portion includes a second core having a stacked structure of tubes through which the heat medium flows, and a second header tank connected to ends of the tubes of the second core and having an outflow portion through which the heat medium flows out of the second heat-exchange portion, the first header tank allows a gas-phase heat medium to flow through the first header tank, the second header tank allows a liquid-phase heat medium to flow through the second header tank, the liquid-phase heat medium is lower in temperature than the gas-phase heat medium flowing through the first header tank, the first header tank and the second header tank are connected to each other via a connecting portion, the connecting portion has a slit passing through the connecting portion, a tank longitudinal direction is defined as a direction parallel to both a central axis of the first header tank and a central axis of the second header tank, and the slit is one of slits arranged side by side in the connecting portion at a predetermined slit interval in the tank longitudinal direction, characterized in that a length of each of the slits in the tank longitudinal direction is longer than a length of the slit interval in the tank longitudinal direction.