Oxygen isotope ratio determination on any of the water phases (water vapor, water, ice) is of great relevance in different research fields such as climate and paleoclimate studies, geological surveys, and hydrological studies. The conventional technique for oxygen isotope measurement involves equilibration with carbon dioxide gas for a given time with a subsequent isotope determination. The equilibration technique is available in different layouts, but all of them are rather time-consuming. Here we report a new on-line technique that processes water samples as well as ice samples. The same principal, CO2 hydration, is used but speeded up by (i) a direct injection and full dissolution of CO2 in the water, (ii) an increased isotope exchange temperature at 50 degrees C, and (iii) a rapid gas extraction by means of an air-permeable membrane into a continuous helium flux supplying the isotope ratio mass spectrometer with the sample gas. The precision is better than 0.1/1000 which is only slightly larger than with the conventional equilibration technique. This on-line technique allows analysis of 1 m of ice with a resolution of 1-3 cm, depending on the meltwater flux, within 1 h. Similarly, continuous and fast analysis can be performed for aqueous samples for hydrological, geological, and perhaps medical applications.