Marshmallows, like most sweets, are sweetened with sucrose. They are currently prepared by the aeration of mixtures of sucrose and proteins to a final density of about 0.5 g/ml. The viscosity of the mixture, owing to the proteins, gelatin or egg albumin, prevents collapse of the air-filled cells.
The use of marshmallow to make a sweet dates back to ancient Egypt, where the recipe called for extracting sap from the plant and mixing it with nuts and honey. Another pre-modern recipe uses the pith of the marshmallow plant, rather than the sap. The stem was peeled back to reveal the soft and spongy pith, which was boiled in sugar syrup and dried to produce a soft, chewy confection.
Confectioners in early 19th century France made the innovation of whipping up the marshmallow sap and sweetening it, to make a confection similar to modern marshmallow. The confection was made locally, however, by the owners of small sweet shops. They would extract the sap from the mallow plant’s root, and whip it themselves. The candy was very popular, but its manufacture was labour-intensive. In the late 19th century, French manufacturers thought of using egg whites or gelatin, combined with modified corn starch, to create the chewy base. This avoided the labour-intensive extraction process, but it did require industrial methods to combine the gelatin and corn starch in the right way.