Selective functionalization of dielectric surfaces is required for area-selective atomic layer deposition and etching. We have identified precursors for the selective gas-phase functionalization of plasma-deposited SiO2and SiNxsurfaces with hydrocarbons. The corresponding reaction mechanism of the precursor molecules with the two surfaces was studied using in situ surface infrared spectroscopy. We show that at a substrate temperature of 70 °C, cyclic azasilanes preferentially react with an −OH-terminated SiO2surface over a −NHx-terminated SiNxsurface with an attachment selectivity of ∼5.4, which is limited by the partial oxidation of the SiNxsurface. The cyclic azasilane undergoes a ring-opening reaction where the Si–N bond cleaves upon the reaction with surface −OH groups forming a Si–O–Si linkage. After ring opening, the backbone of the grafted hydrocarbon is terminated with a secondary amine, −NHCH3, which can react with water to form an −OH-terminated surface and release CH3NH2as the product. The surface coverage of the grafted cyclic azasilane is calculated as ∼3.3 × 1014cm–2, assuming that each reacted −OH group contributes to one hydrocarbon linkage. For selective attachment to SiNxover SiO2surfaces, we determined the reaction selectivity of aldehydes. We demonstrate that aldehydes selectively attach to SiNxover SiO2surfaces, and for the specific branched aliphatic aldehyde used in this work, almost no reaction was detected with the SiO2surface. A fraction of the aldehyde molecules reacts with surface −NH2groups to form an imine (Si–N═C) surface linker with H2O released as the byproduct. The other fraction of the aldehydes also reacts with surface −NH2groups but do not undergo the water-elimination step and remains attached to the surface as an aminoalcohol (Si–NH–COH−). The surface coverage of the grafted aldehyde is calculated as ∼9.8 × 1014cm–2using a known infrared absorbance cross-section for the −C(CH3)3groups.