Yes, hydrogen peroxide is an effective method of removing spray paint from the carpet. To use it, you should mix equal parts hydrogen peroxide and water. Apply this solution directly onto the stained area with a clean cloth or sponge, and let it sit for about 5–10 minutes before scrubbing gently in circular motions until all of the spray paint is removed. Rinse with cold water and allow the carpet to dry.