You may need a visa to pass through the UK in transit .To apply for a transit visa you must be in transit to another country with enough funds and the intention to travel on able to prove you can enter that country & able to show that the only purpose of your visit to the UK is transit.
Not leaving the airport
Apply for a Direct Airside Transit visa (DATV) if you’ll be changing flights in the UK and won’t be going through UK border control. DATVs last for up to 24 hours. You can’t apply for this visa if you need to go through immigration (‘cross the border’), eg to check in your luggage on to a connecting flight - apply for a Visitor in Transit visa instead.
Leaving the airport
Apply for a Visitor in Transit visa if you’ll be going through UK border control but leaving the UK within 48 hours. You can also apply for a long-term Visitor in Transit visa if you can prove you need to frequently pass through the UK over a longer period.
Direct Airside Transit visa (DATV) - £40
Visitor in Transit visa - £54
The cost may vary slightly depending on which country you’re in.
Long-term visit visa fees are:
• 1 year - £300
• 2 years - £300
• 5 years - £544
• 10 years - £737