Matrix isolation spectroscopy has been combined with ab initio calculations to characterize the 1:1 complexes of H2O2 with OCS and CS2. The infrared spectra of the argon and nitrogen matrices doped with H2O2 and OCS or CS2 have been measured and analyzed. The geometries of the complexes were optimized at the MP2/6-311++G(3df,3pd) level of theory. Four structures were found for the OCS-H2O2 complex and five for the CS2-H2O2 one; every pair of the corresponding structures showed close correspondence. For every optimized structure the interaction energy was partitioned according to the SAPT Scheme and the topological distribution of the charge density (AIM theory) was performed. The SAPT analysis and AIM results indicate that only one complex among the nine optimized ones is stabilized by the hydrogen bonding, namely the OCS-H2O2 one with the OH group of H2O2 bonded to an oxygen atom of OCS. The other structures are stabilized by van der Waals interaction. The spectra analysis evidences that at least two types of the complexes are trapped in the argon matrices including the most stable ones: hydrogen bonded structure in the case of the OCS-H2O2 complex and the structure stabilized by the S···H and C···O interactions in the case of the CS2-H2O2 complex. The solid nitrogen environment triggers the formation of the structures of C2v symmetry with a sulfur atom of OCS or CS2 directed toward the center of O-O bond of H2O2, stabilized by S···O interactions.