We describe the design and performance of a relative humidity (RH) control chamber for use with atomic force microscopes (AFM) in which the tip is scanned across the stationary sample. The small volume (∼9cm3) chamber encloses the sample, the cantilever holder, and a commercial humidity/temperature sensor. The RH is controlled by passing a controlled ratio of dry and humid nitrogen gas across the sample. This unique design prevents exposure of the scanner assembly to humid gas and maintains all of the functionalities of the AFM system with no measurable degradation of its performance. Using this system, the RH at the sample position can be varied between 5% and 95% and controlled to within ±0.2% during an AFM measurement. To demonstrate the performance of the RH control chamber in imaging and force spectroscopy modes, we have characterized the RH-dependent swelling of small chitosan droplets with diameters of 3–40μm, and the RH dependence of capillary forces between the AFM tip and a mica surface.