We developed two versions of refractometers to measure the refractive index of liquids. One refractometer comprises a glass cell with a surface relief grating on the inner face of one of its walls, while the other one is a microfluidic channel in the form of serpentine that behaves as a grating. Measurements of the liquid refractive index were performed by sensing the first order intensity. Several liquids have been used including an organic one. Calibration plots are shown.