The annual Times Higher Education world rankings put Cambridge in third place and Imperial College London in tenth.
But there is a warning from the compilers of the rankings that other UK universities are "struggling to hold their own" against global rivals.
They warn Germany is "poised to overtake" the UK in having the most top universities in Europe.
The annual rankings show Oxford once again named as the best university in the world, ahead of a US university - the California Institute of Technology - in second place.
US universities continue to dominate the rankings, taking seven of the top 10 places and 60 out of the top 200.
Asian university systems are catching up - with China and Japan continuing to perform strongly in the rankings.
Iran's universities are among the "biggest climbers" in this year's league table.
Top 10 Times Higher Education World University Rankings
California Institute of Technology
Massachusetts Institute of Technology
Imperial College London
The full list is of 1,300 universities in 92 countries, with the rankings taking into account teaching quality, the volume and reputation of research, citations of research, income from industry and international links.
An analysis accompanying the rankings says that the UK's so-called "golden triangle" - Oxford, Cambridge and London universities - continues to be very successful.
But it warns that this is "masking" a relative decline for other UK universities, while German universities are rapidly improving in the league table.
Since 2016, the number of UK universities in the top 200 has fallen from 34 to 28, while the number of German universities has risen from three to 23.