We report on a refractive index sensor based on a planar Bragg grating (PBG) capable to online monitor the water content in Biodiesel and the amount of ethanol admixture to conventional fuels, respectively. Our results demonstrate the capability of the sensor to distinguish the transition between about 190 and 500 ppm water in Biodiesel, enabling to monitor the production process of Biodiesel in the relevant range according to industrial standards. The ethanol content in petrol has been investigated in the range of 0-100%, covering the entire standardized range of E-5 to E-85 fuel mixing ratios. These experiments reveal a sensitivity of 112 nm/riu allowing the measurement of the ethanol content with a resolution of 8.9ÃÂ·10-6.© (2010) COPYRIGHT SPIE--The International Society for Optical Engineering. Downloading of the abstract is permitted for personal use only.