Manufacturers dye fabrics to get the desired colors, and sometimes the odor is not removed in process. Jeans, especially black ones, may still smell strongly of dye when you purchase them. You can get rid of the odor by using an appropriate washing routine that safely removes the dye smell without causing your jeans to fade.
Set your washing machine to a cold water cycle and turn it on. The cold water will prevent fading.
Place the jeans into the wash along with a capful of laundry detergent designed for use with dark colors. Also add a half cup of baking soda, which helps deodorize the fabric.
Pour one cup of white vinegar into the washing machine at the start of the rinse cycle. The vinegar is another deodorizing agent that will get rid of the dye odor without harming the jeans.
Dry the jeans as you normally would.