A heat exchanger used in an air conditioner, the heat exchanger comprising: a plurality of fins disposed so that adjacent fins oppose each other across a gap; a pair of tube plates and positioned at one end section and another end section in a direction of disposition of the plurality of fins; a plurality of refrigerant tubes each having a pair of open end portions and which acts as an inlet and an outlet of a refrigerant; a flow divider having a plurality of branching tubes, each branching tube being connected to one open end portion of the corresponding refrigerant tube; and a header having a plurality of branching tubes, each branching tube being connected to the other open end portion of the corresponding refrigerant tube, wherein each refrigerant tube among the plurality of refrigerant tubes includes a plurality of heat transfer tube portions which extend along the direction of disposition of the plurality of fins between the pair of tube plates while in contact with the plurality of fins, and bent tube portions which connect end portions of two of the heat transfer tube portions to each other, each open end portion is arranged on the one tube plate or the other tube plate, characterized in that the plurality of refrigerant tubes include an even number refrigerant tube which has an even number of the heat transfer tube portions and an odd number refrigerant tube which has an odd number of the heat transfer tube portions, and in the flow divider or the header, a part of the plurality of branching tubes is connected to the open end portion on the side of the one tube plate, and a remainder of the plurality of branching tubes is connected to the open end portion on the side of the other tube plate. a plurality of fins disposed so that adjacent fins oppose each other across a gap; a pair of tube plates and positioned at one end section and another end section in a direction of disposition of the plurality of fins; a plurality of refrigerant tubes each having a pair of open end portions and which acts as an inlet and an outlet of a refrigerant; a flow divider having a plurality of branching tubes, each branching tube being connected to one open end portion of the corresponding refrigerant tube; and a header having a plurality of branching tubes, each branching tube being connected to the other open end portion of the corresponding refrigerant tube, wherein each refrigerant tube among the plurality of refrigerant tubes includes a plurality of heat transfer tube portions which extend along the direction of disposition of the plurality of fins between the pair of tube plates while in contact with the plurality of fins, and bent tube portions which connect end portions of two of the heat transfer tube portions to each other, each open end portion is arranged on the one tube plate or the other tube plate, characterized in that the plurality of refrigerant tubes include an even number refrigerant tube which has an even number of the heat transfer tube portions and an odd number refrigerant tube which has an odd number of the heat transfer tube portions, and in the flow divider or the header, a part of the plurality of branching tubes is connected to the open end portion on the side of the one tube plate, and a remainder of the plurality of branching tubes is connected to the open end portion on the side of the other tube plate.