Edinburgh was second only to London in the list, the same position it won last year, while Glasgow was placed ninth.
The Scots capital was also rated the 21st best destinatiion in Europe.
The results were compiled by TripAdvisor and based on comments and ratings made on the website. Award winners were determined using an algorithm that took into account the quantity and quality of reviews and ratings for hotels, restaurants and attractions in destinations worldwide, gathered over a 12-month period, as well as traveller booking interest.
“Its fantastic news that Edinburgh remains in the same position as last year and it’s also pleasing to see Glasgow remain in the top ten within the UK too,” said Malcolm Roughead, chief executive of VisitScotland.
“Both cities offer a huge number of attractions and experiences for visitors to enjoy so it’s great to see them receive the recognition they deserve through these awards.”
TipAdvisor spokesman James Kay said: “The destinations best rated by travellers are often those that marry value with great experiences, so it is easy to see why Edinburgh and Glasgow – where the average room rate bookable on TripAdvisor is almost half the price of London – have performed so well this year.”
The UK top 10