Containing device for a machine for washing and/or sterilizing loose products, which comprises a containing body provided internally with a treatment compartment, which has a loading/unloading aperture, and a closing unit, selectively mobile between an open condition, in which it allows passage through the loading/unloading aperture in order to load/unload the loose products into/from the treatment compartment, and a closed condition, in which it prevents passage through the loading/unloading aperture. The closing unit comprises a door and lateral containing walls that project from lateral edge of the door configured to laterally contain the loose products, loaded or unloaded in an incoherent form into/from the treatment compartment, when the closing unit is in the open condition.