A transfer device for transferring flexible containers in the form of bags made of a heat-sealable material from at least two adjacent collection positions, where the flexible containers are horizontally aligned and have their respective heat-sealed vertical seams adjacent to one another, to at least two non-adjacent delivery positions, wherein said transfer device is in connection with: • a supply device, which is intended for positioning a horizontal row of aligned and vertically arranged flexible containers in the mentioned collection positions (31 a and 31b), supplied in a production direction; • at least one conveyor device, which is intended for removing the flexible containers from the at least two delivery positions (32a and 32b), feeding at least two production lines (A and B); and said transfer device including: • at least two operable and transferable clamps (10a and 10b), each of which is suitable for collecting a flexible container in one of said collection positions (31a and 31b), by means of actuating the clamp (10a and 10b), and suitable for conveying said flexible container to one of the at least two delivery positions (32a and 32b), by means of moving said clamp (10a and 10b); characterized in that • the at least two clamps (10a and 10b) configured for gripping and transferring at least two flexible containers are assembled on at least two respective moving carriages (20a and 20b) intended for moving in parallel along one translation path, and for transferring said flexible containers in said production direction, said moving carriages (20a and 20b) being actuated by at least one translation actuating device; • all, or all but one, of said moving carriages have a transverse guide arranged in a transverse path perpendicular to the translation path, such that the corresponding clamp assembled on said at least one moving carriage when moving along said translation path moves in the transverse path on said transverse guide, with respect to said moving carriage, introducing a deviation in the transverse path with respect to the translation path and transferring said clamps (10a and 10b) and its corresponding gripped containers, by said moving carriages (20a and 20b), from the collection positions (31a and 31b) to the delivery positions (32a and 32b). • a supply device, which is intended for positioning a horizontal row of aligned and vertically arranged flexible containers in the mentioned collection positions (31 a and 31b), supplied in a production direction; • at least one conveyor device, which is intended for removing the flexible containers from the at least two delivery positions (32a and 32b), feeding at least two production lines (A and B); and • at least two operable and transferable clamps (10a and 10b), each of which is suitable for collecting a flexible container in one of said collection positions (31a and 31b), by means of actuating the clamp (10a and 10b), and suitable for conveying said flexible container to one of the at least two delivery positions (32a and 32b), by means of moving said clamp (10a and 10b); • the at least two clamps (10a and 10b) configured for gripping and transferring at least two flexible containers are assembled on at least two respective moving carriages (20a and 20b) intended for moving in parallel along one translation path, and for transferring said flexible containers in said production direction, said moving carriages (20a and 20b) being actuated by at least one translation actuating device; • all, or all but one, of said moving carriages have a transverse guide arranged in a transverse path perpendicular to the translation path, such that the corresponding clamp assembled on said at least one moving carriage when moving along said translation path moves in the transverse path on said transverse guide, with respect to said moving carriage, introducing a deviation in the transverse path with respect to the translation path and transferring said clamps (10a and 10b) and its corresponding gripped containers, by said moving carriages (20a and 20b), from the collection positions (31a and 31b) to the delivery positions (32a and 32b).