A man who claimed he was mistaken for a neo-Nazi and stabbed because of his buzz cut admits he made it all up — and says the stabbing was just an accident, according to a report.

Joshua Witt, 26, told cops recently that he was getting out of his car in the parking lot of a Steak ‘n Shake in Sheridan, Colorado, when he was attacked by a knife-wielding man.

But when presented with evidence that his story was sheer nonsense, Witt came clean, BuzzFeed reported.

Witt told The Post last week that his alleged attacker asked him, “Are you one of them neo-Nazis?”

“I threw my hands up and once the knife kind of hit, I dived back into my car and shut the door and watched him run off west, behind my car,” he said.

“The dude was actually aiming for my head,” he added. “I was more in shock because I was just getting a milkshake.”

Police questioned his story because surveillance video did not show anyone running from the scene, as Witt had claimed, and because they interviewed someone who matched Witt’s description of the attacker.

A transient who lives in the area was cleared as a possible suspect, BuzzFeed reported.

Investigators also examined video from a nearby sporting goods store, which showed Witt buying a small knife minutes before the alleged attack.

“Mr. Witt subsequently admitted to accidentally cutting himself with the knife while parked in his car in front of the sporting goods store and admitted making up the story about being attacked,” Sheridan police said in a statement.

He was charged with falsely reporting an incident and released on a summons.