This document examines the effects of acidic and alkaline contamination on the pH behavior of expansive and non-expansive soils, specifically black cotton soil, red earth, and shedi soil. Results indicate that the addition of calcium carbonate and magnesium carbonate increases pH levels, while contamination with sulfuric and phosphoric acids significantly decreases pH, with sulfuric acid causing a greater reduction. The study highlights the importance of understanding soil chemistry for effective soil management, especially in contaminated environments.