North Korea has condemned the US government for imposing a travel ban on the country, pledging that its doors would remain open for visiting Americans.

A North Korean foreign affairs spokesman on Friday called the travel ban "a vile measure to limit the people-to-people exchange so as not to allow the US citizens to see the true picture of the [Democratic People's Republic of Korea]," according to state-run Korean Central News Agency (KCNA).

The travel ban is evidence that the US sees North Korea as its enemy, the spokesman said.

The US state department announced on July 21 it would ban US citizens from travelling to North Korea, citing "mounting concerns over the serious risk of arrest and long-term detention under North Korea's system of law enforcement".

The travel ban came after the death in June of US college student Otto Warmbier, who was jailed in North Korea for allegedly trying to steal a propaganda banner from his hotel and returned to the US from North Korea in a coma.

The US state department said this week that the ban would take effect on September 1, and that those already in North Korea should depart before that deadline.

"Now is [the] time for the Trump administration to come to its senses and make a decision to abandon its hostile policy," KCNA quoted the North Korean spokesman as saying.

"We will always leave our door wide open to any US citizen who would like to visit our country out of goodwill and to see the realities with their own eyes."