Taiwan's education minister has been forced to apologise after a high school was roundly ridiculed and criticised, including by Israel's envoy, for its students dressing up in costumes resembling Nazi uniforms and brandishing swastika banners at a cosplay party.

Education Minister Pan Wen-chung issued an apology on Saturday (Dec 24) for the incident, urging all schools in Taiwan to learn a lesson from the incident, Taiwan media reported.

His apology came as the presidential office issued a statement condemning the students' act, and instructed the ministry to hold the school accountable.

The furore erupted after photos of students of the private Hsinchu Kuang-Fu High School, in the northern city of Hsinchu, dressed in costumes that looked like Nazi uniforms at a cosplay event were posted online on Friday.

The students were also pictured holding swastika flags and displaying Nazi tanks made of paper cartons.

The Israel Economic and Cultural Office in Taipei, which represents Israel's interests in Taiwan in the absence of diplomatic ties, issued a statement condemning the "tasteless" acts by the students, reported Central News Agency.

"It is deplorable and shocking" that only seven decades after the world witnessed the horrors of the Holocaust, a high school in Taiwan supports "such an outrageous action," said Mr Asher Yarden, Israel's representative to Taiwan.

The German Institute said it was "shocked" by the incident.

The school apologised on Saturday for the faux pas, stressing that it did not support the violence committed by the Nazis.

It said in a statement that the cosplay event was part of the school's anniversary celebrations, whose theme this year was historical figures.

Form teacher Liu Hsi-cheng was quoted by Central News Agency as saying that when his class voted to cosplay Adolf Hitler, he warned them that Hitler is a controversial figure and repeatedly asked if they wanted to proceed.

With hindsight, Liu said, he neglected his duty as a teacher and "should have immediately rejected (the decision) on the spot."

Some students were reportedly feeling distressed over the online backlash and have told the teacher that they cannot attend school on Monday, the report said.