It is well known that both the star formation rate and the cold gas content of a galaxy depend on the local density out to distances of a few Mpc. In this paper, we compare the environmental density dependence of the atomic gas mass fractions of nearby galaxies with the density dependence of their central and global specific star formation rates. We stack H i line spectra extracted from the Arecibo Legacy Fast ALFA survey centred on galaxies with ultraviolet imaging from GALEX and optical imaging/spectroscopy from Sloan Digital Sky Survey. We use these stacked spectra to evaluate the mean atomic gas mass fraction of galaxies in bins of stellar mass and local density. For galaxies with stellar masses less than 1010.5 M⊙, the decline in mean atomic gas mass fraction with density is stronger than the decline in mean global and central specific star formation rate. The same conclusion does not hold for more massive galaxies. We interpret our results as evidence for ram-pressure stripping of atomic gas from the outer discs of low-mass satellite galaxies. We compare our results with the semi-analytic recipes of Guo et al. implemented on the Millennium II Simulation. These models assume that only the diffuse gas surrounding satellite galaxies is stripped, a process that is often termed ‘strangulation’. We show that these models predict relative trends in atomic gas and star formation that are in disagreement with observations. We use mock catalogues generated from the simulation to predict the halo masses of the H i-deficient galaxies in our sample. We conclude that ram-pressure stripping is likely to become effective in dark matter haloes with masses greater than 1013 M⊙.