Pectin is a set of complex carbohydrates that occurs in some ripe fruits. Pectin helps the fruit to form a thick, jelly texture when it is cooked to make jam.