Modern devices based on modular designs require versatile and universal sensor components which provide an efficient, sensitive, and compact measurement unit. To improve the space capacity of devices, miniaturized building elements are needed, which implies a turning away from conventional microcantilevers toward nanoscale cantilevers. Nanowires can be seen as high-quality resonators and offer the opportunity to create sensing devices on small scales. To use such a one-dimensional nanostructure as a resonant cantilever, a precise characterization based on the fundamental properties is needed. We present a correlative electron and light microscopy approach to characterize the pressure and environment sensing capabilities of single nanowires by analyzing their resonance behavior in situ. The high vacuum in electron microscopes enables the characterization of the intrinsic vibrational properties and the maximum quality factor. To analyze the damping effect caused by the interaction of the gas molecules with the excited nanowire, the in situ resonance measurements have been performed under non-high-vacuum conditions. For this purpose, single nanowires are mounted in a specifically designed compact gas chamber underneath the light microscope, which enables direct observation of the resonance behavior and evaluation of the quality factor with dependence of the applied gas atmosphere (He, N 2 , Ar, Air) and pressure level. By using the resonance vibration, we demonstrate the pressure sensing capability of a single nanowire and examine the molar mass of the surrounding atmosphere. Together this shows that even single nanowires can be utilized as versatile nanoscale gas sensors.