A compositional variety of planetary cores provides insight into their core/mantle evolution and chemistry in the early solar system. To infer core composition from geophysical data, a precise knowledge of elastic properties of core‐forming materials is of prime importance. Here, we measure the sound velocity and density of liquid Fe‐Ni‐S (17 and 30 at% S) and Fe‐Ni‐Si (29 and 38 at% Si) at high pressures and report the effects of pressure and composition on these properties. Our data show that the addition of sulfur to iron substantially reduces the sound velocity of the alloy and the bulk modulus in the conditions of this study, while adding silicon to iron increases its sound velocity but has almost no effect on the bulk modulus. Based on the obtained elastic properties combined with geodesy data, S or Si content in the core is estimated to 4.6 wt% S or 10.5 wt% Si for Mercury, 9.8 wt% S or 18.3 wt% Si for the Moon, and 32.4 wt% S or 30.3 wt% Si for Mars. In these core compositions, differences in sound velocity profiles between an Fe‐Ni‐S and Fe‐Ni‐Si core in Mercury are small, whereas for Mars and the Moon, the differences are substantially larger and could be detected by upcoming seismic sounding missions to those bodies.