Hydrogen-enhanced decohesion (HEDE) is one of the many mechanisms of hydrogen embrittlement, a phenomenon that severely impacts structural materials such as iron and iron alloys. Grain boundaries (GBs) play a critical role in this mechanism, where they can provide trapping sites or act as hydrogen diffusion pathways. The interaction of H with GBs and other crystallographic defects, and thus the solubility and distribution of H in the microstructure, depends on the concentration, chemical potential, and local stress. Therefore, for a quantitative assessment of HEDE, a generalized solution energy in conjunction with the cohesive strength as a function of hydrogen coverage is needed. In this paper, we carry out density functional theory calculations to investigate the influence of H on the decohesion of the Σ5(310)[001] and Σ3(112)[11¯0] symmetrical tilt GBs in bcc Fe, as examples for open and close-packed GB structures. A method to identify the segregation sites at the GB plane is proposed. The results indicate that at higher local concentrations, H leads to a significant reduction of the cohesive strength of the GB planes, significantly more pronounced at the Σ5 than at the Σ3 GB. Interestingly, at finite stress, the Σ3 GB becomes more favorable for H solution, as opposed to the case of zero stress, where the Σ5 GB is more attractive. This suggests that, under certain conditions, stresses in the microstructure can lead to a redistribution of H to the stronger grain boundary, which opens a path to designing H-resistant microstructures. To round up our study, we investigate the effects of typical alloying elements in ferritic steel, C, V, Cr, and Mn, on the solubility of H and the strength of the GBs. Published by the American Physical Society 2024