In the present work, an integrated optofluidic chip for fluid viscosity measurements in the range from 1 mPa·s to 100 mPa·s is proposed. The device allows the use of small sample volumes (<1 µL) and the measurement of viscosity as a function of temperature. Thanks to the precise control of the force exerted on dielectric spheres by optical beams, the viscosity of fluids is assessed by comparing the experimentally observed movement of dielectric beads produced by the optical forces with that expected by numerical calculations. The chip and the developed technique are validated by analyzing several fluids, such as Milli-Q water, ethanol and water–glycerol mixtures. The results show a good agreement between the experimental values and those reported in the literature. The extremely reduced volume of the sample required and the high flexibility of this technique make it a good candidate for measuring a wide range of viscosity values as well as for the analysis of nonlinear viscosity in complex fluids.