An exhaust gas heat exchanger comprising: a cooler through which cooling water flows and in which a plurality of gas tubes is provided to allow exhaust gas to flow; an intake and exhaust block including an intake part to which an exhaust gas pipe for supplying exhaust gas is connected, a supply line for communicating first ends of some of the plurality of gas tubes with the intake part, a discharge line for communicating first ends of the remaining tubes of the plurality of gas tubes with outside, a bypass line for bypassing exhaust gas entering from the intake part to the outside, and a first flap for blocking selectively any one line of the supply line and the bypass line; and a U-turn block including an inflow part into which exhaust gas discharged through second ends of some of the plurality of gas tubes flows, a re-cooling line for communicating second ends of the remaining tubes of the plurality of gas tubes with the inflow part, wherein a supply partition having a supply hole is provided in the supply line, a bypass partition having a bypass hole is provided in the bypass line, the first flap is rotatably mounted on the intake and exhaust block and is operated to cover the supply hole or the bypass hole depending on a rotational angle thereof, and wherein a re-cooling partition having a re-cooling hole is provided in the re-cooling line, characterized in that the U-turn block includes further a release line for discharging exhaust gas entering from the inflow part to the outside, and a second flap for blocking selectively any one line of the re-cooling line and the release line; and the exhaust gas heat exchanger further includes an air duct for guiding exhaust gas to the discharge line, the exhaust gas being discharged through the release line, wherein a release partition having a release hole is provided in the release line, the second flap is rotatably mounted on the U-turn block and is operated to cover the re-cooling hole or the release hole depending on a rotational angle thereof, and wherein outlets of the discharge line and the bypass line are integrally formed into a single pipe that is divided by a discharge partition. a cooler through which cooling water flows and in which a plurality of gas tubes is provided to allow exhaust gas to flow; an intake and exhaust block including an intake part to which an exhaust gas pipe for supplying exhaust gas is connected, a supply line for communicating first ends of some of the plurality of gas tubes with the intake part, a discharge line for communicating first ends of the remaining tubes of the plurality of gas tubes with outside, a bypass line for bypassing exhaust gas entering from the intake part to the outside, and a first flap for blocking selectively any one line of the supply line and the bypass line; and a U-turn block including an inflow part into which exhaust gas discharged through second ends of some of the plurality of gas tubes flows, a re-cooling line for communicating second ends of the remaining tubes of the plurality of gas tubes with the inflow part, wherein a supply partition having a supply hole is provided in the supply line, a bypass partition having a bypass hole is provided in the bypass line, the first flap is rotatably mounted on the intake and exhaust block and is operated to cover the supply hole or the bypass hole depending on a rotational angle thereof, and wherein a re-cooling partition having a re-cooling hole is provided in the re-cooling line, the U-turn block includes further a release line for discharging exhaust gas entering from the inflow part to the outside, and a second flap for blocking selectively any one line of the re-cooling line and the release line; and the exhaust gas heat exchanger further includes an air duct for guiding exhaust gas to the discharge line, the exhaust gas being discharged through the release line, wherein a release partition having a release hole is provided in the release line, the second flap is rotatably mounted on the U-turn block and is operated to cover the re-cooling hole or the release hole depending on a rotational angle thereof, and wherein outlets of the discharge line and the bypass line are integrally formed into a single pipe that is divided by a discharge partition.