Upvote:2
You can apply for a Visitor In Transit Visa which will allow you to pass through UK Border Control and remain landside for up to 48 hours.
Note that London's airports are not close to the centre of London. If your layover is less than about 8 hours there won't be anything 'outside' that you'll have time to get to, return, and pass through security again.