The development of slip lines, due to strain localization, is a common cause for failure of soil in many circumstances investigated in geotechnical engineering. Through the use of numerical methods – like finite elements – many practitioners are able to take into account complex geometrical and physical conditions in their analyses. However, when dealing with shear bands, standard finite elements display lack of precision, mesh dependency and locking. This paper introduces a (stabilized) mixed finite element formulation with continuous linear strain and displacement interpolations. Von Mises and Drucker–Prager local plasticity models with strain softening are considered as constitutive law. This innovative formulation succeeds in overcoming the limitations of the standard formulation and provides accurate results within the vicinity of the shear bands, specifically without suffering from mesh dependency. Finally, 2D and 3D numerical examples demonstrate the accuracy and robustness in the computation of localization bands, without the introduction of additional tracking techniques as usually required by other methods.