A sterilizing machine (10) for loose products, comprising at least a treatment chamber (11) to sterilize said loose products, also comprises an apparatus (100) for automatic packaging into bags (101) of the sterilized loose products exiting from a discharge aperture (15a) of the treatment chamber (11). The automatic packaging apparatus (100) comprises at least a bag feed device (103) provided with a motorized bag transfer unit (105) to transfer the bags (101) from a bag storage chamber (104) to a bag support element (102), a bag opening device (111) to open a bag (101) supported by the bag support element (102) and a bag sealing device (117) to seal a bag (101) filled with the sterilized loose products.