The San Jose Fire Department said they were called to Sunrise Middle School on Wednesday morning after they received "reports of multiple patients with difficulty breathing."
Battalion Chief Robert Culbertson said that crews got a 911 call at 9 a.m. about eight students who smelled something that made them ill.
Two children were transported to the hospital, officials said, and another six students will be picked up by their parents.
A total of 25 firefighters responded and hazmat crews came in to take air samples from the rear of a particular classroom, Culberton said.
Crews are testing various cleaning products as well.
The area is isolated, Culbertson said, and the school remains open.