Resumen: The enhancement of soil engineering properties with biopolymers has been shown recently as a viable and environmentally benign alternative to cement and chemical stabilization. Interest in biopolymer-treated soil is evident from the upsurge of related research activities in the last five years, most of which have been experimental in nature. However, biopolymers have not yet found their way into engineering practice. One of the reasons for this may be the absence of computational models that would allow engineers to incorporate biopolymer-treated soil into their designs. Therefore, the main goal of this study is to numerically capture a macroscopic stress-strain response and investigate the effect of biopolymers on the onset of strain localization. Several diagnostic strain-localization analyses were conducted, thus providing strain and stress levels at the onset of strain localization, along with the orientations of the deformation band. Several unconfined compression and triaxial tests on the plain and biopolymer-treated soils were modeled. Results showed that biopolymers significantly improved the mechanical behavior of the soil and affected the onset of strain localization. The numerical results were confirmed by the digital image analysis of the unconfined compression tests. Digital image processing successfully captured high strain concentrations, which tended to occur close to the peak stress.