You can NOT use bleach on carpet stains.
Using Bleach on Carpets Is a Risky Proposition
Chlorine works by breaking down the molecule bonds that create color called chromophores. What results is a shorter molecule that either does not absorb light to reflect visible color or completely destroys it. In either scenario, bleach has the ability to remove color.
It stands to reason that due to these color-removing properties, bleach would be a good choose as a stain remover. It also stands to reason that if it can remove stain colors, it can also remove carpet dyes. Therefore, though you may ultimately discover the exact dilution of chlorine with water or other solvent to effectively remove stains, you also run the risk of ruining your carpet if you don't get it right the first time.
Bleach Stains in the Carpet
The chemicals sodium hypochlorite and calcium hypochlorite found in chlorine bleach, oxygen bleach, swimming pool chemicals and mildew removers will leave behind yellow stains when they come in contact with upholstery or carpeting.
Can You Remove Bleach Stains on Carpet?
If you have already used bleach on your carpet and it has left a stain, immediately blot the area with a sponge and water. Lift as much of the bleach as you can with a soft, absorbent cloth. Be very careful to work from the outside of the stain inward so as not to cause the stain to spread further. Once you have absorbed as much as you can, apply a paste of three parts baking soda to one part water with a toothbrush and gently rub the stain. Let this dry. Vacuum and repeat as needed.
Worst Case Scenario
If you are facing a stain that has already ruined your carpet, such as blood, and you are willing to throw caution to the wind, (It's already ruined so what do I have to lose) the book Worst Case Scenario: Life suggests using a mild form of bleach such as that found in peroxide or lemon juice. Use it sparingly and only blot the area quickly rinsing it with water.