Biopolymers have recently shown great potential to replace traditional binding materials in geotechnical engineering; however, more research is required to reach a deeper understanding of biopolymer-treated soil behavior. The objective of this study was to investigate the most important parameters that affect the behavior of biopolymer-treated soil, including biopolymer content, dehydration time, soil type effect, and durability. Sodium alginate and agar biopolymers were used due to their stability under severe conditions and the reasonable costs to study these parameters. A broad range of soil particle sizes was used to optimize the kaolinite-sand combination. As one of the main concerns in the behavior of biotreated soils, durability was investigated under five cycles of wetting and drying. In addition, a comprehensive microstructural study was performed by FTIR analysis and SEM images, as well as chemical interaction analysis. The results indicated that the optimized biopolymer content was in the range of 0.5–1% (to soil weight) and the dehydration time was 14 days. A soil combination of 25% kaolinite and 75% sand provided the highest compressive strength. Under wetting and drying conditions, biopolymers significantly increased soil resistance against strength reduction and soil mass loss. The results showed that the biopolymers, agar and sodium alginate provided significant soil improvement. The optimum values of different parameters to reach the highest performance were also obtained. In addition, the biopolymers were highly effective in enhancing the durability of the treated soil under wetting and drying conditions. Based on the results, optimal values of the agar and sodium alginate-treated soil for sand and kaolinite are confirmed.