A heat exchanger, comprising: a header having a first primary channel (62a 1), a second primary channel (62a2), a plurality of first linking channels (62b1) and a plurality of second linking channels (62b2), a first refrigerant flowing through the first primary channel, and a second refrigerant flowing through the second primary channel; a first flat tube linked to the header and having a plurality of first refrigerant-channel holes, the first refrigerant flowing through the first refrigerant-channel holes; and a second flat tube linked to the header and having a plurality of second refrigerant-channel holes, the second refrigerant flowing through the second refrigerant-channel holes, the header having a sub-channel-forming member for forming a plurality of first sub-channels (62c1) and a plurality of second sub-channels (62c2), the first sub-channels allowing the first primary channel to be communicated with the first refrigerant-channel holes, and the second sub-channels allowing the second primary channel to be communicated with the second refrigerant-channel holes; and the first flat tube and the second flat tube being in close contact, and heat being exchanged between the first refrigerant flowing through the first refrigerant-channel holes and the second refrigerant flowing through the second refrigerant-channel holes, characterized in that: the first flat tube and the second flat tube are linked to the header so that a cross-sectional longitudinal direction intersects a longitudinal direction of the header, the cross-sectional longitudinal direction being alignment directions of the first refrigerant-channel holes (62a1) and the second refrigerant-channel holes (62a2), the sub-channel-forming member having a spacer member with a plurality of spacer holes (63c1) positioned in the longitudinal direction of the header, the first sub-channels (62c1) being the spacer holes (63c1) that communicatingly connect with the first linking channels (62b1), the second sub-channels (62c2) being the spacer holes (63c1) that communicatingly connect to the second linking channels (62b2), the first sub-channels (62c1) being spaces that, along with the first linking channels (62b1), communicatingly connect the first refrigerant-channel holes and the first primary channel (62a1), and the second sub-channels (62c2) being spaces that, along with the second linking channels (62b2), communicatingly connect the second refrigerant-channel holes and the second primary channel (62a2). a header having a first primary channel (62a 1), a second primary channel (62a2), a plurality of first linking channels (62b1) and a plurality of second linking channels (62b2), a first refrigerant flowing through the first primary channel, and a second refrigerant flowing through the second primary channel; a first flat tube linked to the header and having a plurality of first refrigerant-channel holes, the first refrigerant flowing through the first refrigerant-channel holes; and a second flat tube linked to the header and having a plurality of second refrigerant-channel holes, the second refrigerant flowing through the second refrigerant-channel holes, the header having a sub-channel-forming member for forming a plurality of first sub-channels (62c1) and a plurality of second sub-channels (62c2), the first sub-channels allowing the first primary channel to be communicated with the first refrigerant-channel holes, and the second sub-channels allowing the second primary channel to be communicated with the second refrigerant-channel holes; and the first flat tube and the second flat tube being in close contact, and heat being exchanged between the first refrigerant flowing through the first refrigerant-channel holes and the second refrigerant flowing through the second refrigerant-channel holes, characterized in that: the first flat tube and the second flat tube are linked to the header so that a cross-sectional longitudinal direction intersects a longitudinal direction of the header, the cross-sectional longitudinal direction being alignment directions of the first refrigerant-channel holes (62a1) and the second refrigerant-channel holes (62a2), the sub-channel-forming member having a spacer member with a plurality of spacer holes (63c1) positioned in the longitudinal direction of the header, the first sub-channels (62c1) being the spacer holes (63c1) that communicatingly connect with the first linking channels (62b1), the second sub-channels (62c2) being the spacer holes (63c1) that communicatingly connect to the second linking channels (62b2), the first sub-channels (62c1) being spaces that, along with the first linking channels (62b1), communicatingly connect the first refrigerant-channel holes and the first primary channel (62a1), and the second sub-channels (62c2) being spaces that, along with the second linking channels (62b2), communicatingly connect the second refrigerant-channel holes and the second primary channel (62a2).