A heat exchanger comprising: a plurality of flat pipes arranged side by side in a step direction predetermined, an inside of each of the plurality of flat pipes being provided with a passage of refrigerant; and a header collecting pipe (70, 80) to which the plurality of flat pipes are connected, the header collecting pipe extending along the step direction, wherein the header collecting pipe includes: a flat pipe-side header forming member to which the plurality of flat pipes are inserted; and an opposite-side header forming member facing the flat pipe-side header forming member and forming an internal space (70S, 80S) between the flat pipe-side header forming member and the opposite-side header forming member, the flat pipe-side header forming member has a flat pipe-side curved portion protruding toward the plurality of flat pipes when viewed along the step direction, the opposite-side header forming member has an opposite-side curved portion protruding toward a side away from the plurality of flat pipes when viewed along the step direction, and an inner diameter of the opposite-side curved portion is smaller than an inner diameter of the flat pipe-side curved portion, wherein the inner diameter of the flat pipe-side curved portion is larger than a width of each of the plurality of flat pipes, characterized in that the inner diameter of the opposite-side curved portion is smaller than the width of each of the plurality of flat pipes. a plurality of flat pipes arranged side by side in a step direction predetermined, an inside of each of the plurality of flat pipes being provided with a passage of refrigerant; and a header collecting pipe (70, 80) to which the plurality of flat pipes are connected, the header collecting pipe extending along the step direction, wherein the header collecting pipe includes: a flat pipe-side header forming member to which the plurality of flat pipes are inserted; and an opposite-side header forming member facing the flat pipe-side header forming member and forming an internal space (70S, 80S) between the flat pipe-side header forming member and the opposite-side header forming member, a flat pipe-side header forming member to which the plurality of flat pipes are inserted; and an opposite-side header forming member facing the flat pipe-side header forming member and forming an internal space (70S, 80S) between the flat pipe-side header forming member and the opposite-side header forming member, the flat pipe-side header forming member has a flat pipe-side curved portion protruding toward the plurality of flat pipes when viewed along the step direction, the opposite-side header forming member has an opposite-side curved portion protruding toward a side away from the plurality of flat pipes when viewed along the step direction, and an inner diameter of the opposite-side curved portion is smaller than an inner diameter of the flat pipe-side curved portion, wherein the inner diameter of the flat pipe-side curved portion is larger than a width of each of the plurality of flat pipes, characterized in that the inner diameter of the opposite-side curved portion is smaller than the width of each of the plurality of flat pipes.