A heat exchanger for thermoelectric generators having at least two channels for a cooling medium and at least one channel for a heating medium, the at least one channel for the heating medium being equipped with ribs in the inner region. These ribs are mounted at a number of ribs that increases in the heating flow direction which, among other things, contributes to a more efficient utilization and a comparability of the heat flow.