Both cities have only 0.01 toilets available per square kilometer for the public, according to the ranking released by British company QS Supplies, one of the largest independent bathroom wholesalers and retailers in the United Kingdom.
Vietnam's two biggest cities only ranked ahead of Cairo, which came in at the bottom of the ranking with 0.002 public restrooms per square kilometer.
Paris topped the ranking as the French capital boasts seven public toilets per square kilometer, followed by Sydney (3.64) and Zurich (2.9).
To compile the ranking, the British company measured the distance to each bathroom using Google Maps geocoding API. Furthermore, it used public toilet tracking app Pee Place to measure the average distance to a bathroom in 69 of the world's most popular destination cities.
As of 2017, HCMC has around 208 public restrooms, according to the city's Transport Department.
In 2016, the city of 13 million people planned to build 1,000 public restrooms to meet the large number of migrants and foreign visitors pouring into the city. However, the project exists only on paper due to the lack of land.
According to the Hanoi Department of Construction, there are 351 public toilets in Hanoi as of 2020, most of them built in 1990.
The country received 3.6 million foreign tourists last year but targets eight million arrivals for this year.