Chlorine bleach contains the active ingredient sodium hypochlorite (NaOCl), while non-chlorine bleaches have different active ingredients for different purposes.
Hydrogen peroxide, for instance, is common in color-safe bleaches, and sodium percarbonate or sodium perboate are typically used in "oxygen power" stain removers.
So what, exactly, happens to that ketchup stain on your white T-shirt when you bleach it? In order to understand how chlorine bleach makes a stain "disappear," we need to understand how colors work.
How Colors Work
Light is both a particle and a wave; its particles, called photons, travel in waves that have a particular length.
Not all wavelengths of light are visible to the human eye: Infrared light wavelengths are too long for our eyes to see, and ultraviolet wavelengths are too short. The wavelengths we can see are between 400 and 700 nanometers, and they appear as color to us.
For example, when light with a wavelength of about 475 nanometers hits the retina in your eye, you perceive the color blue. The light that comes from the ketchup stain on your T-shirt to your retina has a wavelength of about 650 nanometers, which makes it appear red.
The Chemical Makeup of a Stain
The reason the ketchup stain reflects light with a wavelength of 650 nanometers has to do with its chemical makeup. Like most other substances, ketchup is made up of multiple elements joined together by chemical bonds to form molecules.
The electrons involved in some of these bonds are capable of absorbing light of certain wavelengths, depending on the characteristics of the chemical bond. The light that the electrons in a substance can't absorb determines the substance's color.
So the ketchup stain is absorbing all of the wavelengths of normal light that hit it — except the 650 nanometer light, which it reflects back to your eye, making it appear red.
How Chlorine Bleach Makes Stains 'Disappear'
Many stains have a network of double bonds between carbon atoms, and this network absorbs light. Chlorine bleach solutions can oxidize many of these bonds, breaking them and taking away the substance's ability to absorb light.
When this happens, the stain "disappears." When bleach oxidizes the ketchup on your T-shirt, the ketchup stops being able to absorb light. It then appears white, like the rest of the shirt.
The remains of the ketchup can still be there; you just won't see the stain anymore. Soaking and washing the shirt can remove the now-invisible stain.
Why Does Bleach Take the Color Out of Clothes?
Since sodium hypochlorite is a powerful oxidizing agent, it is able to oxidize chemical bonds not only in stains on your clothing, but also in the dyes that give the clothing its color.
Anyone who has accidentally dripped chlorine bleach on their favorite pair of jeans has experienced just how effective bleach is as an oxidizing agent.
A non-chlorine bleach that uses a weaker oxidizing agent, such as hydrogen peroxide, can break the chemical bonds in certain stains without breaking the stronger chemical bonds in clothing dye.