In this work, nitrogen dioxide (NO 2 ) detection by using p + –n silicon diodes surrounded by a porous silicon (PS) layer is demonstrated. The effect of the NO 2 (at concentrations of hundreds ppb) on the sensor current was investigated for both reverse and forward polarization voltages, using relative humidity (RH) and ethanol at different levels as interfering species. Adsorption of NO 2 in the PS layer modifies the electrical properties of the PS/crystalline silicon interface and, in turn, the p + –n diode current. The device shows a high selectivity to NO 2 with respect to ethanol, at any polarization voltage and relative humidity level: for instance, a NO 2 concentration as low as 100ppb produces a current variation of about one order of magnitude, while 100ppm of ethanol do not significantly affect the diode current. For a given NO 2 concentration, the current variation depends on the diode bias, so that the sensor response can be tuned by changing the polarization voltage. Finally, the relative humidity, one of the most important interfering species for gas sensors, shows a negligible effect on the sensor behaviour.