A system for sorting a plurality of pillow bags (100, 101,..., 100x) containing salty products, comprising: - a loading station comprising a conveyor belt extending by a predetermined length along a first horizontal lying plane, first motor means to move said conveyor belt with a first advancement speed so as to transport a row of pillow bags (100, 101,..., 100x) from a loading position to an unloading position; - an ordering station comprising a support plane extending along a second horizontal lying plane (X') and intended to receive and support a plurality of pillow bags (100, 101,..., 100x), second motor means to move said support plane with a second advancement speed from a loading position to an unloading position; - a plurality of panels (6,7) active on said support plane to define a plurality of containing spaces, each of which being intended to contain a predetermined plurality of pillow bags (100, 101,..., 100x); - robotic gripping means configured to take a pillow bag at a time from said row of pillow bags (100, 101,..., 100x) present on said conveyor belt and to put it into a containing space defined on said support plane; - detecting means of the spatial position of each bag of said row of pillow bags (100, 101,..., 100x), said detecting means being associated to said conveyor belt in the proximity of said loading position and configured to generate a passage signal upon the passage of each pillow bag (100, 101,..., 100x) present on said conveyor belt, said passage signal being representative of the time instant at which said pillow bag (100, 101,..., 100x) has passed; - processing and driving means in signal communication with said detecting means and electrically connected with said gripping means and with said second motor means, said processing and driving means comprising a firmware configured for: - processing said passage signal as a function of said first advancement speed and said length of said conveyor belt so as to generate a position signal identifying the position taken by each of said pillow bag (100, 101,..., 100x) with respect to said conveyor belt, and - generating a driving signal to drive said second motor means to change said second advancement speed as a function of said position signal. - a loading station comprising a conveyor belt extending by a predetermined length along a first horizontal lying plane, first motor means to move said conveyor belt with a first advancement speed so as to transport a row of pillow bags (100, 101,..., 100x) from a loading position to an unloading position; - an ordering station comprising a support plane extending along a second horizontal lying plane (X') and intended to receive and support a plurality of pillow bags (100, 101,..., 100x), second motor means to move said support plane with a second advancement speed from a loading position to an unloading position; - a plurality of panels (6,7) active on said support plane to define a plurality of containing spaces, each of which being intended to contain a predetermined plurality of pillow bags (100, 101,..., 100x); - robotic gripping means configured to take a pillow bag at a time from said row of pillow bags (100, 101,..., 100x) present on said conveyor belt and to put it into a containing space defined on said support plane; - detecting means of the spatial position of each bag of said row of pillow bags (100, 101,..., 100x), said detecting means being associated to said conveyor belt in the proximity of said loading position and configured to generate a passage signal upon the passage of each pillow bag (100, 101,..., 100x) present on said conveyor belt, said passage signal being representative of the time instant at which said pillow bag (100, 101,..., 100x) has passed; - processing and driving means in signal communication with said detecting means and electrically connected with said gripping means and with said second motor means, said processing and driving means comprising a firmware configured for: - processing said passage signal as a function of said first advancement speed and said length of said conveyor belt so as to generate a position signal identifying the position taken by each of said pillow bag (100, 101,..., 100x) with respect to said conveyor belt, and - generating a driving signal to drive said second motor means to change said second advancement speed as a function of said position signal.