A heat exchanger, comprising: a first pipe having a first flow path formed therein, the first flow path being configured to flow a heat medium therethrough, a second pipe having a second flow path formed therein and being wound around the first pipe, the second flow path being configured to flow refrigerant therethrough, wherein the first pipe has an inflow port for the heat medium and an outflow port for the heat medium, the inflow port and the outflow port communicate with the first flow path, wherein the first pipe includes: a crest portion, which protrudes in a diameter-increasing direction in which a diameter of the first pipe is increased; and a trough portion having an outer diameter smaller than an outer diameter of a part in which the crest portion is formed and around which the second pipe is wound, wherein the crest portion is formed in a helical shape in the first flow path in a direction in which the heat medium flows, wherein the trough portion is formed in a helical shape along the crest portion, wherein the trough portion includes a plurality of concave portions, which are formed so as to be aligned with each other in a helical direction that is a direction in which the trough portion is formed, and are recessed in a diameter-decreasing direction in which the diameter of the first pipe is decreased, wherein the concave portions are formed in the trough portion, and are not formed in the crest portion, wherein the plurality of concave portions are formed so that, when a part of the first pipe on the inflow port side is taken as the first region and a part of the first pipe on the outflow port side is taken as the second region, a total area per unit length of the formed concave portions in the second region is larger than a total area per unit length of the formed concave portions in the first region, and the first pipe is formed so that a number of threads formed by crest portions in the first region and a number of threads formed by crest portions in the second region are different from each other. a first pipe having a first flow path formed therein, the first flow path being configured to flow a heat medium therethrough, a second pipe having a second flow path formed therein and being wound around the first pipe, the second flow path being configured to flow refrigerant therethrough, wherein the first pipe has an inflow port for the heat medium and an outflow port for the heat medium, the inflow port and the outflow port communicate with the first flow path, wherein the first pipe includes: a crest portion, which protrudes in a diameter-increasing direction in which a diameter of the first pipe is increased; and a trough portion having an outer diameter smaller than an outer diameter of a part in which the crest portion is formed and around which the second pipe is wound, a crest portion, which protrudes in a diameter-increasing direction in which a diameter of the first pipe is increased; and a trough portion having an outer diameter smaller than an outer diameter of a part in which the crest portion is formed and around which the second pipe is wound, wherein the crest portion is formed in a helical shape in the first flow path in a direction in which the heat medium flows, wherein the trough portion is formed in a helical shape along the crest portion, wherein the trough portion includes a plurality of concave portions, which are formed so as to be aligned with each other in a helical direction that is a direction in which the trough portion is formed, and are recessed in a diameter-decreasing direction in which the diameter of the first pipe is decreased, wherein the concave portions are formed in the trough portion, and are not formed in the crest portion, wherein the plurality of concave portions are formed so that, when a part of the first pipe on the inflow port side is taken as the first region and a part of the first pipe on the outflow port side is taken as the second region, a total area per unit length of the formed concave portions in the second region is larger than a total area per unit length of the formed concave portions in the first region, and the first pipe is formed so that a number of threads formed by crest portions in the first region and a number of threads formed by crest portions in the second region are different from each other.