The design of building foundations has usually been based on tradition, local practice, experience, and structural design codes. Safety is invariably considered the main factor and environmental criteria (or, in general, sustainability) is seldom given due consideration. However, similar safety indicators can be achieved with different variables and a minimum safety factor must always be ensured. The main objective of this study is, from an environmental perspective, to assess the influence of the construction system (cast-in-situ or precast), foundation type (rigid or flexible), and structural code (EC-2 or EHE-08) in the case of a concrete shallow foundation (CSF), using Life Cycle Assessment (LCA). Applying this methodology, the materials (concrete and steel) yielded the highest impacts in all categories, at around 95% for cast-in-situ CSFs and at around 85% for precast CSFs, both in relation to global warming. Consequently, optimization of the amount of these materials is crucial when considering the particular variables selected in this study. The results showed that cast-in-situ and flexible CSFs at moderately shallow depths (and therefore with less steel reinforcement) and precast CSFs with considerable reductions in concrete volumes (due to sloped shapes) had lower environmental impacts. In addition, cast-in-situ CSFs constructed in accordance with the EHE-08 structural code showed lower impacts, while precast CSFs complying with the EC-2 code were environmentally preferable. However, a specific study might be required for specific factors in each case (loads, soil type, structural settlement, among others). Relevant environmental effects associated with the three variables should therefore be given specific consideration in the development of structural design codes and future constructions.