The speed of sound in high-purity n-hexane and n-heptane was experimentally studied utilizing the double-path length pulse-echo technique. Measurements with each alkane were carried out at temperatures from (233 to 353) K with pressures up to 20 MPa. Considering the uncertainty contributions from temperature, pressure, path-length calibration, pulse timing and sample purity, the relative expanded combined uncertainty (k = 2) in the speed of sound in n-hexane ranges from (0.012 to 0.042) % over the investigated ranges of pressure and temperature; for n-heptane, the uncertainty varies from (0.014 to 0.018) %. The sound speed data measured in n-hexane were among the data used for the development of a new fundamental equation of state, which is, however, not described in this work. The experimental data of n-heptane can be considered appropriate for modeling purposes and validation of existing equations of state.