Chlorine gas is primarily generated when bleach and an acid are mixed. Dangerous chloramine gas is the risk when mixing bleach with ammonia.

The liquid in a bottle of bleach is strongly alkaline. Manufacturers add a strong base (sodium hydroxide) to bleach to help preserve its shelf life. The higher the pH, the more stable the active ingredients are.