For particularly obstinate mold and mildew, you can go in for a non-chlorine bleach or lemon juice and salt solution for colored fabrics. Else you can just slightly brush the area with a solution of hydrogen peroxide (one part of 3 percent hydrogen peroxide to five parts of water), provided you are sure that the solution doesn’t harm the fabric of the carpet. Click here for other stain removal