The measurement of a pressure difference with high accuracy at extreme conditions is one of the challenges for this method. The pressure difference between the ends of the capillary is most often measured by a mercury U-tube. However, it is not convenient to use mercury in proximity of such extreme conditions with a flameable gas, especially in an urban area. A new capillary viscometer has been developed for measurement of the absolute viscosity of gases for high pressure and high temperature. The apparatus is simple and designed for safe-handling. The gas was supplied to the capillary tube through a pressure regulator system to maintain a steady state flow from a high-pressure reservoir tank. Two absolute pressure transducers were used as a pressure differential unit. The pressure difference along the capillary tube was calculated by subtracting the outlet pressure (Pout) from the inlet (Pin). This present study shows that the pressure differential sensor can measure viscosities of hydrogen and nitrogen for temperature ranges from 297 to 500 K and for pressures up to 99 MPa with a maximum deviation up to 2 % compared with existing correlations.