The process by which plants convert carbon dioxide and water into glucose and oxygen is photosynthesis.
In plant cells, chlorophyll captures energy from sunlight inside structures called chloroplasts. That light energy powers reactions that split water molecules, releasing oxygen and producing energy-rich molecules used to build sugars from carbon dioxide.
The simplified overall equation is usually written as carbon dioxide + water + light energy → glucose + oxygen. The glucose may be used immediately for energy, converted into sucrose for transport, or stored as starch. It also supplies carbon skeletons for materials such as cellulose.
Photosynthesis is not the same as cellular respiration, a common mix-up. Respiration breaks down sugars to release usable energy, while photosynthesis stores light energy in chemical bonds. The oxygen released during ordinary plant photosynthesis comes primarily from the splitting of water, not directly from carbon dioxide. Jan Ingenhousz demonstrated in 1779 that light was essential to this air-restoring activity in plants.