You may be eligible to transit without a visa if:
you arrive and depart by air
have a confirmed onward flight that leaves on the day you arrive or before midnight on the day after you arrive
have the right documents for your destination (eg a visa for that country)
One of the following must also apply:
you’re travelling to (or on part of a reasonable journey to) Australia, Canada, New Zealand or the USA and have a valid visa for that country
you’re travelling from (or on part of a reasonable journey from) Australia, Canada, New Zealand or the USA and have a valid visa for that country
you’re travelling from (or on part of a reasonable journey from) Australia, Canada, New Zealand or the USA and it’s less than 6 months since you last entered that country with a valid entry visa
you have a permanent residence permit issued by Australia or New Zealand
you have a common format residence permit issued by an European Economic Area (EEA) country or Switzerland
you have a permanent residence permit issued by Canada on or after 28 June 2002