A heat exchanger, comprising: a duct (1, 5) including at least two plates (11, 12, 11a, 11b, 12a, 12b, 51, 52) combined into a cylindrical shape, a first fluid flow channel (13, 53) provided inside the duct through which a first fluid passes, an inflow port (14, 54) for the first fluid on one end of the first fluid flow channel, and an outflow port (15, 55) for the first fluid on another end of the first fluid flow channel; a stacked core (2, 6) that is accommodated in the duct and includes a plurality of tubes (21, 61) having flat shapes and being stacked, a second fluid flow channel provided inside each of the plurality of tubes through which a second fluid passes, and outer fins (22, 62) arranged between adjacent tubes of the plurality of tubes, the tubes and the outer fins being brazed to each other; the duct includes a first plate (11, 11 a, 11 b, 51) disposed to face at least one of end faces of the stacked core in the core width direction, and a second plate (12, 12a, 12b, 52) disposed to face at least one of end faces of the stacked core in the tube stacking direction, and characterised in that it further comprises a coupling plate (3, 7) that is brazed to the duct and has a groove portion (33, 73) defining a peripheral edge of the inflow port or the outflow port, wherein a direction intersecting with a tube stacking direction and a first fluid flow direction is defined as a core width direction, and the second plate includes a second-plate end plate portion (121, 521) disposed to face the end face of the stacked core in the core width direction and brazed to a wall surface of the first plate, a second-plate center plate portion (122, 522) disposed to face the end face of the stacked core in the tube stacking direction, and a flange portion (123, 523) that extends in the tube stacking direction and is brazed to a bottom wall surface (32, 72) of the groove of the coupling plate. a duct (1, 5) including at least two plates (11, 12, 11a, 11b, 12a, 12b, 51, 52) combined into a cylindrical shape, a first fluid flow channel (13, 53) provided inside the duct through which a first fluid passes, an inflow port (14, 54) for the first fluid on one end of the first fluid flow channel, and an outflow port (15, 55) for the first fluid on another end of the first fluid flow channel; a stacked core (2, 6) that is accommodated in the duct and includes a plurality of tubes (21, 61) having flat shapes and being stacked, a second fluid flow channel provided inside each of the plurality of tubes through which a second fluid passes, and outer fins (22, 62) arranged between adjacent tubes of the plurality of tubes, the tubes and the outer fins being brazed to each other; the duct includes a first plate (11, 11 a, 11 b, 51) disposed to face at least one of end faces of the stacked core in the core width direction, and a second plate (12, 12a, 12b, 52) disposed to face at least one of end faces of the stacked core in the tube stacking direction, and characterised in that it further comprises a coupling plate (3, 7) that is brazed to the duct and has a groove portion (33, 73) defining a peripheral edge of the inflow port or the outflow port, wherein a direction intersecting with a tube stacking direction and a first fluid flow direction is defined as a core width direction, and the second plate includes a second-plate end plate portion (121, 521) disposed to face the end face of the stacked core in the core width direction and brazed to a wall surface of the first plate, a second-plate center plate portion (122, 522) disposed to face the end face of the stacked core in the tube stacking direction, and a flange portion (123, 523) that extends in the tube stacking direction and is brazed to a bottom wall surface (32, 72) of the groove of the coupling plate.