Peace be upon you. The permissibility of gelatin depends on the materials used in its preparation. If the gelatin is plant-based, it is halal. However, if it is animal-based, it is forbidden if derived from parts of an animal whose meat is prohibited or from the skin of an animal that is permissible to eat but was not slaughtered according to Islamic law. If it is produced from the bones of an animal that is halal and slaughtered according to Islamic law, it is halal. If the bones were not slaughtered according to Islamic law but were purified, it is also halal. In any case, if it is unknown whether the gelatin is halal or haram, there is no issue in consuming it. According to Ayatollah Khamenei, if there is doubt about whether it is derived from an animal or a plant, there is no need to investigate further. However, if it is known to be derived from an animal, it is not permissible to consume it unless it is confirmed that the animal was slaughtered in accordance with Islamic law. According to Ayatollah Sistani, if it is known that the gelatin has undergone a chemical transformation during its manufacturing process, it is permissible to consume it, although this is not definitively established. May you be successful in all good things.