Vlogger Turan William Salis was doing a live stream in a supermarket when he was approached by an officer who communicated with him via Google Translate.
He was politely quizzed on Monday about whether he was walking around shirtless, to which the young man replied yes, saying he "went swimming at the beach".
"You're not allowed to be naked above the waist in the town," the officer responded in Google Translate, and the tourist immediately apologised.
"Japanese are very understanding," he said in the comments. "I handed in my passport, they took down my details and then handed my passport back, and we went our seperate ways."
Social media users praise tourist and police officer
The video capturing the exchange received more than 3.3 million views, with some also not knowing about accepted Japanese customs. In most parts of Japan it is not illegal to be shirtless but it's not socially acceptable.
"Nice of you to apologise... they seemed very kind," one person said.
"What a solid interaction," another said.
"Very polite of you both. I like to see normal interactions and no attitude," a third person said.
Afterwards, the vlogger said he was allowed to continue his livestream.
Aussie woman warns about $800 bikini fine for tourists
Meanwhile in June, a Aussie tourist warned people to be "extra careful this Euro Summer" with what they wear in public.
"I don't know what it is about Italians but they do not want tourists going around in their bikinis around little towns near beaches," she said in her viral TikTok.
People can be fined up to 500 euros (A$810) for doing so, and could apply to men too when it comes to walking around town shirtless.
Do you have a story tip? Email: email@example.com.