An easy-to-use sample environment reaction cell for X-ray based in situ studies of powders and small structured samples, e.g., powder, pellet, and monolith catalysts, is described. The design of the cell allows for flexible use of appropriate X-ray transparent windows, shielding the sample from ambient conditions, such that incident X-ray energies as low as 3 keV can be used. Thus, in situ X-ray absorption spectroscopy (XAS) measurements in either transmission or fluorescence mode are facilitated. Total gas flows up to about 500 mln/min can be fed while the sample temperature is accurately controlled (at least) in the range of 25-500 °C. The gas feed is composed by a versatile gas-mixing system and the effluent gas flow composition is monitored with mass spectrometry (MS). These systems are described briefly. Results from simultaneous XAS/MS measurements during oxidation of carbon monoxide over a 4% Pt/Al2O3 powder catalyst are used to illustrate the system performance in terms of transmission XAS. Also, 2.2% Pd/Al2O3 and 2% Ag - Al2O3 powder catalysts have been used to demonstrate X-ray absorption near-edge structure (XANES) spectroscopy in fluorescence mode. Further, a 2% Pt/Al2O3 monolith catalyst was used ex situ for transmission XANES. The reaction cell opens for facile studies of structure-function relationships for model as well as realistic catalysts both in the form of powders, small pellets, and coated or extruded monoliths at near realistic conditions. The applicability of the cell for X-ray diffraction measurements is discussed.