There were no indications of a second shooter after police methodically searched the campus in San Bruno.
"The building is completely secure. There's no threat to public safety," San Bruno Police Chief Ed Barberini said at an afternoon press conference.
We are responding to an active shooter. Please stay away from Cherry Ave & Bay Hill Drive.
— San Bruno Police (@SanBrunoPolice) April 3, 2018
The victims included three people with gunshot wounds and a fourth person who injured an ankle fleeing the chaotic scene.
Law enforcement officials say the suspect is a woman from Southern California, whose age is around 35-40. She does not have an apparent connection to YouTube, but the person believed to be her intended target is one of the victims listed in critical condition.
Another law enforcement source confirmed to ABC7's sister station KGO's reporter Dan Noyes in San Francisco that the shooter was a white, adult female wearing a dark top.
She was later identified by those sources as Nasim Aghdam, who was a user of the platform and had previous addresses in Riverside and San Diego.
She was 39 and originally from San Diego, according to San Bruno police.
Two federal law-enforcement officials told ABC News that early indications point to the shooting being the result of a domestic situation. They say the incident does not appear to be terror-related. But San Bruno police said a motive was now unclear.
They added that there has been no evidence or indication that Aghdam knew the people she shot and that they were not specifically targeted.
The probe is in its earliest stages and investigators are not prepared to say they've reached final conclusions.
Police said the weapon used was a handgun. The model was not disclosed.
San Bruno Police Chief Ed Barberini said authorities received multiple 911 calls about a shooting at 12:46 p.m. and officers arrived at the company's San Bruno headquarters at 12:48 p.m.
As they began searching for the suspect, they found a chaotic scene, with numerous employees fleeing from the building.
They found one victim with gunshot wounds at the front of the business as they arrived, and another one nearby a few minutes later. They also found two additional injured victims at a nearby business.
The three with gunshot wounds were transported to local hospitals.
Officers then found a woman inside the building who appeared to be dead of a self-inflicted wound. Police believe she was the shooter, but they are continuing to investigate.
A spokesman for Zuckerberg San Francisco General Hospital says it received three patients.
Spokesman Brent Andrew says a 36-year-old man is in critical condition, a 32-year-old woman is in serious condition and a 27-year-old woman is in fair condition.
"This is a terrible day in the United States," said trauma surgeon Dr. Andre Campbell. "Once again we have a multiple casualty situation that's confronted us here at the Zuckerberg San Francisco General Hospital."
Michael Finney was working at Carl's Jr. nearby when a woman came in with a bullet wound in her leg.
"I came out the bathroom and she was already in the dining room and people were taking care of her," Finney said. "I was trying to find some tools to help her. I found a bungee cord and I tied that around her leg to stop the blood flow."
"She just told me she got shot and I don't think she saw the shooter."
About 1,700 people work at the YouTube campus.
Law enforcement officials were seen approaching the building with guns drawn. Employees were seen being evacuated with arms overhead, and the campus was flanked with dozens of police cars and emergency vehicles.
YouTube spokesman Chris Dale thanked San Bruno police for their quick response to the shooting and offered the company's sympathy to the victims.
"We are an incredibly tight-knit community within YouTube. It feels like a family," Dale said. "Today it feels like the entire community of YouTube and all of the employees were victims of this crime. Our hearts go out to those who suffered in this particular attack. And our prayers are with them and their families."
Google, which owns the online video website, posted on Twitter that the company is coordinating with authorities.
Here is the note that @sundarpichai just sent to Googlers worldwide. pic.twitter.com/bdC6KeTl9c
— Google Communications (@Google_Comms) April 3, 2018
This is a sad day for the @YouTube family. We are a close knit community and our hearts go out to everyone impacted. We are grateful to @SanBrunoPolice, the San Bruno Mayor's office, congresswoman @RepSpeier office and first responders.
— Chris Dale (@cadale) April 4, 2018
Was just briefed on the shooting at YouTube’s HQ in San Bruno, California. Our thoughts and prayers are with everybody involved. Thank you to our phenomenal Law Enforcement Officers and First Responders that are currently on the scene.
— Donald J. Trump (@realDonaldTrump) April 3, 2018
My stomach sinks with yet another active shooter alert. I’m praying for the safety of everyone at YouTube headquarters.
— Sen Dianne Feinstein (@SenFeinstein) April 3, 2018
The Associated Press contributed to this report.