Edinburgh was the second most-visited destination in Britain last year, with more than 1.25m overseas tourists visiting.
Of the 31m trips foreign residents took to the UK in 2012, a total of 15.46m were to London.
Manchester came in third (932,000), Birmingham fourth (713,000) and Liverpool fifth (550,000), statistics from VisitBritain showed.
Visits increased last year from the BRIC countries (Brazil, Russia, India and China) — with Scotland having 30% more BRIC trips, including a 54% rise to Glasgow, which was the sixth most visited city (521,000).
VisitBritain strategy and communications director Patricia Yates said: "Last year we welcomed 31m overseas visitors and hope to attract one million more in 2013.
"We're particularly encouraged by the continued strong growth from the influential BRIC markets and their desire to visit locations across the UK. "
She went on: "2012 has certainly helped change the world's perceptions of Britain, and there is real potential for us to attract 40m international visitors a year by 2020, an achievement which will mean more visitors are travelling to London and beyond.
"However, we face intense competition from other destinations eager to attract more visitors. That means we need to work better and smarter if we are to secure a long-term legacy for tourism and the country."
Minister for tourism Hugh Robertson said: "We showcased the very best of Britain last year, encouraging overseas visitors to come and see for themselves what our great country has to offer.
"I am encouraged that destinations across Britain have seen visitor numbers rise and we will do all we can to keep up that momentum. Tourism spend is up and I am confident that the industry can continue to grow and increase its contribution to the economy further."
Feedback: We want your feedback on our site. If you've got questions, spotted an inaccuracy or just want to share some ideas about our news service, please email us on firstname.lastname@example.org.
Download: The STV News app is Scotland's favourite and is available for iPhone from the Apple store and for Android from Google Play. Download it today and continue to enjoy STV News wherever you are.