The nonlocal means algorithm is a noise attenuation filter that was originally developed for the purposes of image denoising. This algorithm denoises each sample or pixel within an image by utilizing other similar samples or pixels regardless of their spatial proximity, making the process nonlocal. Such a technique places no assumptions on the data except that structures within the data contain a degree of redundancy. Because this is generally true for reflection seismic data, we propose to adopt the nonlocal means algorithm to attenuate random noise in seismic data. Tests with synthetic and real data sets demonstrate that the nonlocal means algorithm does not smear seismic energy across sharp discontinuities or curved events when compared to seismic denoising methods such as f-x deconvolution.