An egg shell consists of calcium carbonate (CaCO3). It easily reacts with vinegar – a water solution of acetic acid (CH3COOH). The shell dissolves due to following reaction:
CaCO3 + 2CH3COOH Ca(CH3COO)2 + H2O + CO2
After the reaction egg shell disappears. CaCO3 and vinegar turn to water soluble calcium acetate (Ca(CH3COO)2), water and carbon dioxide gas (CO2). The formation of gas bubbles on egg surface is observed due to CO2 released during the reaction.
When you take out the egg after the reaction is complete it looks a bit bigger than it was at the beginning of the experiment because some vinegar comes through the egg membrane and fills the egg. The membrane consists of compounds which do not react with vinegar. So it is not destroyed during the experiment and helps the egg to keep its shape. The origin of liquid flow from the solution to the egg through the semipermeable membrane is the difference of solute concentration in solution around the egg and within the egg. The phenomenon of spontaneous movement of solvent molecules through a partially permeable membrane in the direction that tends to equalize the solute concentrations in two regions is called osmosis.
The osmosis phenomena is the process by which it is possible to make the egg shrink and shrivel up. To shrink the egg place it into a glass with liquid which contain a small amount of water (for example corn syrup). The water inside the egg will move through the membrane to equalize water concentration. After some time (about 2 days) the egg looks like an empty air balloon. To restore the egg just put it into a glass with clear water.