In 1635 the Japanese were forbidden, on pain of death, to attempt to travel abroad, and Japanese citizens already overseas were prevented from returning, in case they brought back subversive Christian doctrines.
Before 1635 the Japanese were free to travel to countries outside of Japan.