It’s an arms race inside the nation’s largest school system.

Student weapons busts have skyrocketed by 80 percent compared to pre-pandemic levels, according to startling new NYPD data.

From guns and knives to tasers and pepper spray, city kids are are packing a lot more than books this year.

A Bedford-Stuyvesant teacher told The Post that students she would never have suspected of carrying weapons are now doing so out of fear.

“Tasers and pepper spray are becoming about as common as pencils and erasers,” she said. “You have kids looking for trouble, and then you have those who want to protect themselves.”

A Queens principal said the surge is a reflection of the city as a whole. “If it’s more dangerous out on the street then this is what you are going to see,” he said. “It shouldn’t surprise anyone.”

A total of 3,315 weapons were recovered in Department of Education schools from July 1 to February 20 of this academic year. Over that same stretch in the last pre-pandemic year in 2019-2020, the figure was 1,845 — an increase of 80 percent, according to the NYPD.

A loaded .38 pistol was taken from a 14-year-old boy at Automotive High School on Oct. 28, 2021.

Only one gun was recovered during that span in 2019-2020. This year, 14 firearms have been taken from students.

Taser cases have soared, jumping by a whopping 591 percent, according to the data. Between July and late February, 325 tasers have been recovered — compared to just 47 during that period in 2020.

Knife busts have vaulted by 25 percent with the return of full-time schooling. In 2020, officials took 1,134 blades off of students. That number has shot up to 1,420 year to date thus far, the data reveals.

The NYPD also has an “other” category of weapon that includes items like pepper spray and brass knuckles. That grouping has seen a 326 percent hike — rising from 279 to 1,190, the numbers show.

At Brooklyn Urban Assembly School for Law and Justice, a metal detector found 21 weapons in one day.

(Kevin C. Downs for The New York

Teachers and safety agents — especially those working in areas with high crime rates — said most kids are more afraid of their treks to and from school than what awaits in their buildings.

Greg Floyd, the head of the city schools safety agents union, said some kids carry weapons to aggress while others do so for self-defense.

A 17-year-old student was busted for bringing a loaded 9 mm pistol at the Urban Assembly for Law and Justice.

“Kids are scared,” Floyd said. “Period. The laws are written so that the gang members can freely carry weapons with no reprisal. So that means the children who would not carry weapons now must carry weapons to protect themselves. We are failing those kids.”

The DOE said the confiscations are a reflection of effective security personnel inside schools.

“The data shows that this partnership stops weapons and other prohibited items that do not below in schools from entering our buildings,” said DOE spokesperson Nathaniel Styer.