A rotary conveyor with change of pitch for transferring containers, comprising: a rotary platform rotating about a rotation axis; a plurality of guide elements fixed to said rotary platform and a plurality of slots formed in the rotary platform in positions parallel to said guide elements, where the guide elements and said slots are uniformly distributed around said rotation axis and extend from a peripheral region to a central region of the rotary platform; a closed-loop cam located in a stationary position below the rotary platform, said closed-loop cam defining a path not centered with respect to the rotation axis; a plurality of slides, each being slidingly coupled to one of said guide elements and provided with a cam follower inserted through one of said slots and coupled to said closed-loop cam, where each slide performs a back and forth movement along the corresponding guide element during one rotation of the rotary platform; a plurality of retention elements, each being fixed to one of said slides and provided with a suction port suitable for retaining a container, each suction port being in communication with a suction chamber through a suction conduit; characterized in that: said suction chamber is fixed on the rotary platform and has a plurality of side openings; each of the slides has one of said suction conduits fixed thereto in a position parallel to the corresponding guide element; and each suction conduit has an open outer end connected to the corresponding suction port, an inner open end located inside the suction chamber, and an intermediate portion slidingly inserted in one of said side openings of the suction chamber. a rotary platform rotating about a rotation axis; a plurality of guide elements fixed to said rotary platform and a plurality of slots formed in the rotary platform in positions parallel to said guide elements, where the guide elements and said slots are uniformly distributed around said rotation axis and extend from a peripheral region to a central region of the rotary platform; a closed-loop cam located in a stationary position below the rotary platform, said closed-loop cam defining a path not centered with respect to the rotation axis; a plurality of slides, each being slidingly coupled to one of said guide elements and provided with a cam follower inserted through one of said slots and coupled to said closed-loop cam, where each slide performs a back and forth movement along the corresponding guide element during one rotation of the rotary platform; a plurality of retention elements, each being fixed to one of said slides and provided with a suction port suitable for retaining a container, each suction port being in communication with a suction chamber through a suction conduit; characterized in that: said suction chamber is fixed on the rotary platform and has a plurality of side openings; each of the slides has one of said suction conduits fixed thereto in a position parallel to the corresponding guide element; and each suction conduit has an open outer end connected to the corresponding suction port, an inner open end located inside the suction chamber, and an intermediate portion slidingly inserted in one of said side openings of the suction chamber. said suction chamber is fixed on the rotary platform and has a plurality of side openings; each of the slides has one of said suction conduits fixed thereto in a position parallel to the corresponding guide element; and each suction conduit has an open outer end connected to the corresponding suction port, an inner open end located inside the suction chamber, and an intermediate portion slidingly inserted in one of said side openings of the suction chamber.