At least 27 people were feared dead after a fire swept through a clinic in the Japanese city of Osaka, with media reporting that police were investigating the possibility of arson.

The blaze broke out on the fourth floor of an office building in a busy district of the western Japanese city around 10am local time, public broadcaster NHK said.

More than 20 people have been confirmed dead, broadcaster TV Asahi said. An official at Osaka city's fire department earlier told Reuters that 27 people had suffered from cardiopulmonary arrest, the term used in Japan before a death is officially confirmed.

Another person was injured, the official added.

The fire was largely extinguished within 30 minutes, according to NHK.

Footage from the broadcaster showed smoke pouring out of the windows of the fourth floor, as well as the roof.

Later, the windows appeared blackened and charred.

Located in a shopping and entertainment district not far from Osaka's main train station, the building also houses a beauty salon, a clothes shop and an English-language school, NHK said.

Prime Minister Fumio Kishida offered his condolences and said authorities would be looking to determine the cause of the fire.

The father of a doctor who ran the clinic was not able to reach his son by mobile phone, he told the Yomiuri newspaper.

"Around noon I heard there was news of a fire on television and was surprised. My wife went to the site but we still don't know what's going on. I can't get through to my son's phone."

The clinic's webpage was not accessible but an internet archive from earlier this year showed it treated patients for depression and panic problems, as well as physical issues such as sleep apnoea and anaemia.

Another woman who said she saw smoke coming from the window said that power briefly went out in the surrounding area.

An arson attack at an animation studio in the city of Kyoto in 2019 killed more than 30 people and injured dozens.