The fire department was called to Oak Grove High School around 3pm on reports that people in a biology class smelled something strange and were having trouble breathing.
Firefighters evacuated the classroom and created a "warm zone" on campus for the contaminated students and at least one teacher.
At the time, first responders did not know what caused the problem so those affected were not allowed to leave for fear they could contaminate others.
"I have two friends actually that were in the classroom and I think they were in the worst condition because they were coughing real bad and their skin was red," said sophomore Brandon Thompson.
A spokesperson for the San Jose Fire Department said 12 people were treated and decontaminated on campus.
Six of them were taken to the hospital. The other six were allowed to go home.
Firefighters were concerned for the unknown number of students, who had been in the biology class, who left campus before help arrived.
At first, those students were being asked to return to campus.
But ultimately, the fire department issued instructions for them instead.
"What we want them to do is shower at home, wash their clothes and if they start experiencing any symptoms at all, we want them to call 911," said Captain Mitch Matlow.
The East Side Union High School District issued the following statement: Oak Grove High School notified EMS and San Jose Fire Department today around 3pm, at the end of 7th period, regarding a foreign smell in a biology class. Approximately ten students and the teacher developed teary eyes and itchiness and were immediately evacuated from class. One student was transported to the hospital due to tightness of breath. At first there was concern that there might be a gas leak. There is no evidence of a gas leak. It is believed to have been pepper spray.