Heat exchanger, in particular a charge air cooler or exhaust gas cooler for an internal combustion engine of a motor vehicle, having a first box, a second box which is arranged spaced apart from this first box, and a plurality of pipes by means of which the first box and the second box are fluidically connected, and having a chamber through which a coolant can flow and which is arranged between the two boxes and through which a plurality or all of these pipes, by means of which the two boxes are fluidically connected, run and the base is provided with one or more through-openings for receiving the pipes, characterized in that at least one base has a border which points away from the pipes toward the outside and is provided with a first step and a second step, wherein the border is arranged essentially in the edge 11 region of the base, and the second step is arranged in the region of the first step, offset toward the outside from the first step.