A heat exchanger equipped with a core and a header tank. A groove slanting from the inner surface toward the outer surface of the header tank at a prescribed groove angle is provided along the entire edge of the opening of the header tank, which is welded to the core. A second slanted part slanting from the outer surface toward the inner surface of the header tank at a greater angle than the prescribed groove angle is provided in at least a portion of the edge of the opening of the header tank.