(CNN) — Cram 38 million people in the same city, it's going to be a lawless mess, right?

Not even.

According to newly published stats, the gigantic swirl of humanity that is the Japanese megacity of Tokyo is now the safest major urban destination on the planet.

The Safe Cities Index 2015 , compiled by the Economist, ranks Tokyo at the top in terms of digital security, health security, infrastructure and personal safety.

That's despite it being, so says the United Nations, the most populous city on Earth.

Behind Tokyo, there are few surprises in the top four, with Southeast Asia's capital of calm Singapore following close on its heels, ahead of Osaka and Stockholm.

Laid back Amsterdam's liberal attitudes toward drugs and prostitution prove no obstacle to the Dutch capital's claim to fifth place.

The power of poutine

In sixth is Australia's biggest city, Sydney. Zurich is in seventh, Toronto eighth, while Melbourne, Australia -- last year named the world's friendliest city -- takes ninth.

New York is the only U.S. city to make the top 10.

Not all big cities have a handle on safety though, with plenty sliding down to the other end of the scale.

In last place of the 50 cities ranked is the Indonesian capital Jakarta -- home to more than 10 million.

Ahead of it in the final five are Mexico City, the Saudi Arabian capital of Riyadh, Johannesburg, Ho Chi Minh City and Tehran, Iran.

When it comes to the best city to live in, residents didn't appear to put quite such a premium on safety, with the Economist scoring Toronto highest, followed closely by Montreal.