An Anne Frank children’s Halloween costume has been yanked off an online retail site after getting blasted on social media.

The costume, sold by halloweencostumes.com, featured a beret, navy shirtwaist-style dress with buttons, a felt bag and “felt destination tag sewn to the dress collar.”

“Now, your child can play the role of a World War II hero with this girls World War II costume,” the costume’s description said. “It comes with a blue button up dress, reminiscent of the kind of clothing that might be worn by a young girl during WWII.”

The site also described Frank — the German-born girl who penned a diary of her harrowing experience during the Holocaust — as an “inspiration to us all,” adding that “we can always learn from the struggles of history.”

It wasn’t long until Twitter took notice of the controversial costume.

“Those who thought up or greenlit the selling of an #annefrank costume on @funcostumes should receive some basic training in humanity,” wrote @blackwolfski.

“Totally speechless. Just been shown this ad for an Anne Frank costume for Halloween. @AnneFrankCenter you might want to have a word,” tweeted @JudeHabib.

Carlos Galindo Elvira, a regional director for Arizona’s Anti-Defamation League, tweeted that there are “better ways” to commemorate Anne Frank.

“This is not one,” he said. “We should not trivialize her memory as a costume.”

Ross Walker Smith, a spokesman for Fun.com, which runs the website, said Sunday that the costume had been removed from the site and apologized for the blunder.

“We sell costumes not only for Halloween but for many uses outside of the Halloween season, such as school projects and plays,” he added. “We offer several types of historically accurate costumes — from prominent figures to political figures, to television characters.”