A man screamed "You die!" after bursting into an animation studio, then dousing the floor with petrol and setting it alight in Kyoto on Thursday.

At least 33 people are dead, including some who were trapped in a stairwell in a desperate bid to seek refuge on the building's roof.

Watch the video above

Scores more were injured, some critically, in an attack the Japanese prime minister, Shinzo Abe, has called "too appalling for words".

Shocked bystanders watched as smoke billowed from the torched three-storey complex of Kyoto Animation, also known as KyoAni, and workers emerged bleeding, blackened and barefoot.

RELATED: Earthquake hits off Japan, sparks small tsunami

A 41-year-old man has been arrested in the suspected arson attack in the heart of Japan's ancient capital.

Smoke billows from a Kyoto Animation building in Kyoto, Japan Credit: AP

It is believed to be the country's deadliest fire in nearly two decades.

Kyoto police say the man did not work at the anime studio and they have not indicated what his motive might have been.

'He had a grudge'

A witness who saw the attacker being arrested by police told Japanese media the man, who had burns on his arms and legs, admitted dousing the building with petrol and setting it on fire with a cigarette lighter.

She said his hair was singed and his legs exposed because his jeans were burned below the knees, and he was claiming something had been stolen from him.

"He sounded (like) he had a grudge against the society, and he was talking angrily to the policemen, too, though he was struggling with pain," she said.

Chevron Right Icon 'He sounded (like) he had a grudge against the society.'

"He also sounded (like) he had a grudge against Kyoto Animation."

Another witness told TBS TV there was an explosion before the fire.

"There was an explosion, then I heard people shouting, some asking for help," they said.

"Black smoke was rising from windows on upper floors.

"Then there was a man struggling to crawl out of the window."

Fans devastated

Fire expert Yuji Hasemi at Waseda University told NHK that paper drawings and other documents in the studio also may have contributed to the fire's rapid spread.

People watch the three-story studio of Kyoto Animation in Kyoto as it burns. Credit: AP

Firefighters found 33 bodies, 20 of them on the third floor and some on the stairs to the roof, where they had apparently collapsed, Kyoto fire official Kazuhiro Hayashi said.

Two were found dead on the first floor, 11 others on the second floor, he said.

Death threats

Most of the victims were employees of Kyoto Animation, a company that has been producing films and graphic novels for more than 35 years and has a massive fan following.

A couple prays after placing flowers near the Kyoto Animation building on Friday. Credit: AP

Chevron Right Icon 'My heart is in extreme pain.'

The company's president Hideaki Hatta admitted it had received anonymous death threats by email in the past, but he did not link them to Thursday's attack.

"My heart is in extreme pain," he said.

"Why on earth did such violence have to be used?"

Anime fans took to social media to express their shock and pay homage to their favourite KyoAni shows.

A GoFundMe campaign called "Help KyoAni Heal" has already surpassed its $US750,000 target, with almost $US1 million raised in just 17 hours.

- with AAP